Skip to content

ENG-2467 Lint all schema files with sqruff, including the large ones - #1614

Merged
maparent merged 1 commit into
mainfrom
eng-2467-lint-all-schema-files-with-sqruff-including-the
Nov 11, 2026
Merged

maparent merged 1 commit into
mainfrom
eng-2467-lint-all-schema-files-with-sqruff-including-the

Conversation

@maparent

@maparent maparent commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

Reviewer brief

  • Review focus: the alias in the my_accounts view (account.sql) is the only hand edit, and the migration re-creates the view with it. Everything else is sqruff autofix: whitespace, and keyword case (TRUE→true, NEW→new).

Verification

  • tsx scripts/lintSchemas.ts: passes; sqruff processes all 11 files in supabase/schemas.
  • Token-level diff against main: apart from the alias, only keyword case changes; no string literal, quoted identifier or $$ body changed.
  • pnpm run dbdiff: without the migration it printed DROP VIEW / CREATE VIEW public.my_accounts, because Postgres stores the alias in the view's definition. With the migration, that is gone and only the same 81 GRANT lines remain, which are known false reports from the --use-pg-schema engine.

Loom video

https://www.loom.com/share/193f777b6dc14a74a94cd16b6b342353

Scope check

  • Ran $scope-check against ENG-2467 and the final diff.
  • Scope beyond Done When: a migration that re-creates the my_accounts view.
  • Required now: making the lint pass (AL04, unique table aliases) required changing the view definition to alias a table explicitly. This has no functional impact. View changes require a migration.
  • Anyone affected or consulted: No one else affected; PR author decided.
  • Decision: ENG-2467 comment

Standards check

  • Ran $dg-pr-adherence-check against the final diff and PR metadata.

Local delegated full review

  • Ran a comprehensive review of the entire final diff in a subagent with a fresh context. Use $dg-delegated-full-review when no other full-review workflow is available.

https://linear.app/discourse-graphs/issue/ENG-2467/lint-all-schema-files-with-sqruff-including-the-large-ones

🤖 Generated with Claude Code

@vercel

vercel Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
discourse-graph Ready Ready Preview Nov 11, 2026 7:01pm UTC

Request Review

@linear-code

linear-code Bot commented Nov 8, 2026

Copy link
Copy Markdown

ENG-2467

@supabase

supabase Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Updates to Preview Branch (eng-2467-lint-all-schema-files-with-sqruff-including-the) ↗︎

Deployments Status Updated
Database ✅ Wed, 11 Nov 2026 18:59:31 UTC
Services ✅ Wed, 11 Nov 2026 18:59:31 UTC
APIs ✅ Wed, 11 Nov 2026 18:59:31 UTC

Tasks are run on every commit but only new migration files are pushed.
Close and reopen this PR if you want to apply changes from existing seed or migration files.

Tasks Status Updated
Configurations ✅ Wed, 11 Nov 2026 18:59:31 UTC
Migrations ❌ Wed, 11 Nov 2026 18:59:31 UTC
Seeding ⏸️ Wed, 11 Nov 2026 18:59:15 UTC
Edge Functions ⏸️ Wed, 11 Nov 2026 18:59:15 UTC

❌ Branch Error • Wed, 11 Nov 2026 18:59:33 UTC

Remote migration versions not found in local migrations directory.

View logs for this Workflow Run ↗︎.
Learn more about Supabase for Git ↗︎.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@maparent
maparent force-pushed the eng-2467-lint-all-schema-files-with-sqruff-including-the branch from fd11bcc to 024eaaa Compare November 11, 2026 18:58
@maparent
maparent merged commit 2b5a117 into main Nov 11, 2026
8 of 9 checks passed
@maparent
maparent deleted the eng-2467-lint-all-schema-files-with-sqruff-including-the branch November 11, 2026 19:03

This branch was successfully deployed

1 active deployment
Preview — 024eaaa1 Deployed Nov 11, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants