Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/database-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# see https://supabase.com/docs/guides/deployment/ci/testing for details
name: "database-tests"
on:
workflow_dispatch:
pull_request:
paths:
- ".github/workflows/database-tests.yml"
- "database/**"
- "supabase/**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: supabase/setup-cli@v1
with:
version: latest
Comment on lines +20 to +22
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 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 -30

Repository: 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.

Suggested change
- 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.

- run: printf '[]' > supabase/signing_keys.json && supabase gen signing-key --append --yes
- run: supabase db start
- run: supabase test db
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
-- Add FK-supporting indexes for cascade deletes.
-- These speed up deletes of public.customer/public.document (and in turn public.project).

-- customer(uid) children
create index if not exists customer_otp_challenge_customer_uid_idx
on grida_ciam.customer_otp_challenge (customer_uid);

create index if not exists customer_portal_session_customer_uid_idx
on grida_ciam.customer_portal_session (customer_uid);

create index if not exists grida_forms_response_customer_id_idx
on grida_forms.response (customer_id);

create index if not exists response_session_customer_id_idx
on grida_forms.response_session (customer_id);

create index if not exists invitation_customer_id_idx
on grida_west_referral.invitation (customer_id);

create index if not exists referrer_customer_id_idx
on grida_west_referral.referrer (customer_id);

create index if not exists referrer_customer_id_project_id_idx
on grida_west_referral.referrer (customer_id, project_id);

-- document(id) children
create index if not exists asset_document_id_idx
on public.asset (document_id);

create index if not exists user_project_access_state_document_id_idx
on public.user_project_access_state (document_id);

-- layout(document_id, document_type) composite FK
create index if not exists layout_document_id_document_type_idx
on grida_www.layout (document_id, document_type);
Loading