Recall & Review
beginner
What is a migration in the context of Supabase?
A migration is a file that records changes to the database schema, like creating or modifying tables, so you can apply these changes consistently across environments.
Click to reveal answer
beginner
How do you create a new migration using Supabase CLI?
You run the command
supabase migration new <migration_name> to create a new migration file with the given name.Click to reveal answer
intermediate
Why should migrations be version controlled?
Version control keeps track of all schema changes, helps teams collaborate, and allows you to roll back or replay changes safely.
Click to reveal answer
intermediate
What is the difference between 'up' and 'down' in a migration file?
'Up' defines the changes to apply (like creating tables), while 'down' defines how to undo those changes (like dropping tables).
Click to reveal answer
beginner
How do migrations help when working with multiple environments (development, staging, production)?
Migrations ensure that all environments have the same database structure by applying the same set of changes in order.
Click to reveal answer
Which command creates a new migration file in Supabase CLI?
✗ Incorrect
The command
supabase migration new <migration_name> creates a new migration file.What does the 'down' section in a migration file do?
✗ Incorrect
The 'down' section defines how to undo the changes made in the 'up' section.
Why is it important to keep migrations in version control?
✗ Incorrect
Version control helps track schema changes and collaborate safely.
What is the main benefit of using migrations across multiple environments?
✗ Incorrect
Migrations keep database structure consistent across environments.
Which file type usually contains migration scripts in Supabase?
✗ Incorrect
Migration scripts are typically written in SQL files.
Explain the purpose of migrations in Supabase and how they help manage database changes.
Think about how you keep track of changes to your database structure over time.
You got /4 concepts.
Describe the steps to create and apply a migration using Supabase CLI.
Consider the commands and actions needed from creating to applying a migration.
You got /4 concepts.