supabase db push locally?You run the command supabase db push on your local machine connected to your Supabase project. What is the expected behavior?
Think about what 'push' means in the context of local development databases.
The supabase db push command applies unapplied migrations to the local development database, allowing you to test schema changes locally before pushing them remotely.
Your team is collaborating on a Supabase project. What is the best practice for managing database migrations to avoid conflicts?
Think about how version control helps teams coordinate changes.
Storing migration files in version control ensures all team members have the same migration history. Applying migrations sequentially prevents conflicts and keeps databases in sync.
You want to apply your local migration files to the remote Supabase database. Which command should you use?
Look for the command that explicitly applies migrations remotely with project reference.
The supabase migration up --project-ref <project_ref> command applies unapplied migrations to the remote database identified by the project reference.
Consider running migrations on your remote Supabase database without restricting access. What is the main security risk?
Think about who can run commands on your remote database.
If unauthorized users gain access to run migrations remotely, they can change or delete database structures, risking data integrity and security.
Choose the best sequence of steps to safely develop, test, and deploy database schema changes using Supabase migrations.
Think about the order of writing, testing locally, committing, then deploying remotely.
The safe workflow is to write migration files locally, apply them to your local database to test, commit the migration files to version control, then apply them to the remote database.