GitHub Deploy Supabase (dev) runsDocumentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
supabase db push against project zkgxozahyczcnzpwhbbf. If Dev’s supabase_migrations.schema_migrations does not match the filenames under supabase/migrations/, the CLI will refuse to push (or will error if forced).
Automated diff + repair SQL (preferred)
Use this when local migration files are canonical and Dev’sschema_migrations table is wrong (remote-only timestamps, or missing rows for files that already applied).
1. Export remote versions from Dev
In Dev SQL Editor (projectzkgxozahyczcnzpwhbbf) or via Supabase MCP execute_sql, run:
reports/db/dev-schema-migrations.json in this repo (gitignored if your reports/ policy ignores it; otherwise do not commit).
The array looks like ["20260305230833", ...]. A [{"version":"..."}] shape from other export tools is also accepted.
2. Compute diff (local files vs remote)
onlyRemote / onlyLocal counts. Do not proceed if the diff does not match what you expect (get a second reviewer for shared Dev).
3. Emit repair SQL
4. Apply on Dev
Openreports/db/dev-migration-repair.sql, confirm the INSERT / DELETE blocks, then execute in the Dev SQL Editor or via MCP execute_sql in a single transaction (the file already wraps BEGIN / COMMIT).
Re-run Deploy Supabase (dev) from GitHub Actions (workflow_dispatch on prod).
Scripts: scripts/supabase/compute-migration-diff.mjs, scripts/supabase/emit-migration-repair-sql.mjs. NPM: db:dev:diff-migrations, db:dev:emit-repair-sql.
Symptom A — Remote versions not in repo
Log contains:Remote migration versions not found in local migrations directoryand suggests
supabase migration repair --status reverted <timestamps...>.
Do not blindly revert on a shared Dev DB without confirming those rows are obsolete. Prefer the Automated diff + repair SQL section above, or:
npx supabase link --project-ref zkgxozahyczcnzpwhbbf- Compare
supabase migration list(local vs remote) with a senior DBA / platform owner. - Either add missing migration files from history or run the exact
migration repairplan agreed with the team.
Symptom B — Local files “before” last remote migration
Log contains:Found local migration files to be inserted before the last migration on remote databaseand suggests
supabase db push --include-all.
Using --include-all in CI re-runs SQL that may already exist on Dev (duplicate policies / types). Avoid wiring --include-all into unattended deploy for shared Dev.
Instead: align migration history and repo using the Automated diff + repair SQL section or the same operator process as Symptom A.
After repair
Re-run Deploy Supabase (dev) from GitHub Actions (workflow_dispatch on prod).