Recall & Review
beginner
What is a database migration?
A database migration is a way to change the database structure, like adding or changing tables, so the app can work with new features or fixes.
Click to reveal answer
beginner
Why run migrations locally before remotely?
Running migrations locally helps catch errors early and ensures changes work before updating the live database, avoiding downtime or data loss.
Click to reveal answer
beginner
How do you run a migration locally with Supabase CLI?
Use the command
supabase db migrate up to apply migrations to your local development database.Click to reveal answer
intermediate
How do you apply migrations to a remote Supabase database?
Use
supabase db migrate up or connect your CI/CD pipeline to run migrations on the remote database safely.Click to reveal answer
intermediate
What should you do if a migration fails on the remote database?
Check error messages, fix the migration script locally, test again, then reapply. Always back up data before running migrations remotely.
Click to reveal answer
Which command applies migrations to your local Supabase database?
✗ Incorrect
The command
supabase db migrate up applies migrations locally.Why is it important to run migrations locally first?
✗ Incorrect
Running migrations locally helps catch errors before affecting the live database.
What is a safe practice before running migrations remotely?
✗ Incorrect
Backing up the database protects data if something goes wrong during migration.
Which tool helps automate running migrations on remote Supabase databases?
✗ Incorrect
CI/CD pipelines automate deployment tasks including running migrations remotely.
If a migration fails remotely, what is the first step?
✗ Incorrect
Checking error messages helps identify and fix the problem.
Explain the steps to run database migrations locally and then remotely using Supabase.
Think about testing first, then safely updating the live database.
You got /4 concepts.
Describe best practices to follow when running migrations on a remote database.
Focus on safety and reliability.
You got /4 concepts.