In Supabase, you apply migrations to update your database schema. What is the result of running a rollback migration?
Think about what rollback means in the context of database changes.
Rolling back a migration means undoing the last change to the database schema, restoring it to the previous state.
You want to undo the last migration applied to your Supabase database using the CLI. Which command should you use?
Check the official Supabase CLI commands for migration rollback.
The correct command to rollback the last migration is supabase db rollback. Other commands are invalid or do not exist.
When managing migrations in production, what practice helps ensure that rolling back a migration does not cause data loss or downtime?
Think about how to avoid surprises when undoing database changes.
Writing reversible migrations with down scripts and testing them in staging ensures rollbacks are safe and predictable in production.
Rolling back migrations can affect database security. What is a key security risk to consider?
Consider what schema elements control access and how rollback affects them.
Rolling back migrations can remove or alter security policies or roles, potentially exposing data if not handled carefully.
You rolled back a migration that previously dropped a column from a table. What is the state of the data that was in that column?
Think about how databases handle dropped columns and data storage.
Dropping a column deletes its data permanently. Rolling back the migration restores the column structure but not the lost data.