Everyday commands
Run these fromapps/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 insupabase/migrations/ and committed with your code.
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.