Skip to main content

Everyday commands

Run these from apps/platform. After pulling changes that add a migration, run supabase db reset to bring your local database up to date.

Making schema changes

Schema changes are made as migration files in supabase/migrations/ and committed with your code.
Never change the production schema from the Supabase dashboard.
1

Create a migration

Either write the SQL yourself:
or make changes in local Studio and generate the SQL from them:
2

Test it

Run supabase db reset. This rebuilds the database from every migration, so it catches errors before they reach production.
3

Open a PR

Commit the migration file with the code that uses it, and open a PR into develop.
Migrations are applied to production separately, after the PR is merged. Check with the team before running any command against production.