|
|
|
|
|
by dot5xdev
996 days ago
|
|
> If the new version of the app/schema doesn't behave as you were expecting, you only need to rollback the commit and undo the migration. If I delete a "last_name" column, apply the migration, and then decide I shouldn't have deleted users' last names. Do I get that data back? |
|
"Applying the migration" doesn't actually do anything to the table, it just creates a new schema containing views over the old one, where the view for the table whose column you deleted hides the column. You can then try if your app still works when using accessing this schema instead of the old one. If you're happy, you can "complete" the migration, at which point only the table structure actually gets altered in a non-reversible way.