0
0
Supabasecloud~5 mins

Rolling back migrations in Supabase - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does 'rolling back migrations' mean in Supabase?
It means undoing changes made to the database schema by reversing the last migration or a set of migrations.
Click to reveal answer
beginner
Which Supabase CLI command is used to roll back the last migration?
The command is supabase db migration down to undo the last migration specifically, or supabase db reset which resets the database including rolling back all migrations.
Click to reveal answer
intermediate
Why should you be careful when rolling back migrations in Supabase?
Because rolling back can delete or alter data and schema, potentially causing data loss if not backed up or tested properly.
Click to reveal answer
intermediate
What is a safe practice before rolling back migrations?
Always back up your database and test the rollback process in a development environment before applying it in production.
Click to reveal answer
intermediate
How does Supabase track migrations to enable rolling back?
Supabase stores migration history in a special table that records applied migrations, allowing it to know which ones to undo.
Click to reveal answer
Which command rolls back the last migration in Supabase?
Asupabase db migrate apply
Bsupabase db migration down
Csupabase db push
Dsupabase db reset --no-rollback
What is a risk of rolling back migrations without backup?
AIncreased storage space
BFaster database queries
CData loss or corruption
DAutomatic schema upgrade
Where does Supabase store migration history?
AIn a special migrations table
BIn the application code
CIn the cloud storage bucket
DIn the user session
What should you do before rolling back migrations in production?
ABack up the database
BDelete all data
CRestart the server
DIgnore warnings
Which command resets the database including rolling back all migrations?
Asupabase db push
Bsupabase db migrate undo
Csupabase db status
Dsupabase db reset
Explain the process and risks of rolling back migrations in Supabase.
Think about what happens to your database schema and data when you reverse migrations.
You got /4 concepts.
    Describe best practices to follow before and after rolling back migrations.
    Consider safety steps to avoid data loss and ensure smooth rollback.
    You got /4 concepts.