-
Notifications
You must be signed in to change notification settings - Fork 121
feat: add foreign key supporting indexes for customer and document tables #514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…bles - Created indexes to enhance performance for cascade deletes related to public.customer and public.document. - Added indexes for various child tables including customer_otp_challenge, customer_portal_session, and grida_forms.response to optimize delete operations. - Included composite index for layout to support foreign key relationships on document_id and document_type.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughAdds a DDL migration creating indexes for FK/cascade-delete paths across several schemas, and introduces a GitHub Actions workflow to start a local Supabase DB and run database tests via the Supabase CLI. Changes
Sequence Diagram(s)sequenceDiagram
participant GH as GitHub Actions Runner
participant Repo as Repository
participant CLI as Supabase CLI
participant DB as Local Supabase DB
participant Tests as Test Runner
GH->>Repo: checkout code
GH->>CLI: install supabase CLI
GH->>CLI: generate signing key
GH->>CLI: supabase db start
CLI->>DB: launch database instance
GH->>Tests: supabase test db
Tests->>DB: apply migrations & run tests
DB-->>Tests: test results
Tests-->>GH: report status
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.github/workflows/database-tests.yml:
- Around line 20-22: Replace the unpinned Supabase CLI usage in the GitHub
Actions step that currently uses the action reference "supabase/setup-cli@v1"
with a pinned CLI version by changing the "version: latest" input to a specific
stable version (e.g., "v2.70.5" or newer) so CI is reproducible; update the
workflow step that references the Supabase setup action and commit the pinned
version string to the YAML.
🧹 Nitpick comments (1)
.github/workflows/database-tests.yml (1)
15-24: Consider adding a job timeout to prevent hung workflows.Without a timeout, a stuck database start or test run could consume CI minutes indefinitely. Adding a reasonable timeout improves workflow reliability.
♻️ Proposed fix
jobs: test: runs-on: ubuntu-latest + timeout-minutes: 15 steps: - uses: actions/checkout@v4
| - uses: supabase/setup-cli@v1 | ||
| with: | ||
| version: latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
Supabase CLI latest stable version 2024 2025
💡 Result:
- Latest stable in 2025: Supabase CLI v2.70.5 (tagged Dec 24, 2025). [1]
- Latest stable in 2024: Supabase CLI v2.0.0 (the v2.0.0 upgrade discussion dates to Dec 12, 2024, indicating the 2.0.0 release timeframe). [2]
- For reference (post‑2025): Supabase’s changelog notes features “available since CLI v2.72.7” (mid‑Jan 2026). [3]
Sources:
[1] https://github.com/supabase/cli/tags?after=v2.71.1
[2] supabase/cli#2971
[3] https://supabase.com/changelog
🏁 Script executed:
# Read the actual workflow file to verify the code snippet
cat -n .github/workflows/database-tests.yml | head -30Repository: gridaco/grida
Length of output: 778
Pin the Supabase CLI version for reproducible builds.
Using version: latest can cause unexpected CI failures when new CLI versions introduce breaking changes or bugs. Pin to a specific stable version (currently v2.70.5 or later) instead of the latest.
♻️ Proposed fix
- uses: supabase/setup-cli@v1
with:
- version: latest
+ version: 2.70.5📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - uses: supabase/setup-cli@v1 | |
| with: | |
| version: latest | |
| - uses: supabase/setup-cli@v1 | |
| with: | |
| version: 2.70.5 |
🤖 Prompt for AI Agents
In @.github/workflows/database-tests.yml around lines 20 - 22, Replace the
unpinned Supabase CLI usage in the GitHub Actions step that currently uses the
action reference "supabase/setup-cli@v1" with a pinned CLI version by changing
the "version: latest" input to a specific stable version (e.g., "v2.70.5" or
newer) so CI is reproducible; update the workflow step that references the
Supabase setup action and commit the pinned version string to the YAML.
- Included a step to generate a signing key using the Supabase CLI, outputting the key to supabase/signing_keys.json for use in database tests.
- Changed the signing key generation step to initialize the signing_keys.json file with an empty array and append the generated key, ensuring proper handling of the signing keys for database tests.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.