Rollback post migrations

I recently implemented your post migration system, after having a look at your two configuration files post_migration_generator.rb and 000-post_migration.rb.

However, I have some concerns regarding the potential risks associated with a destructive operation. In the case of removing a column from a table, I would like to explore the best practices for reverting this migration and ensuring data integrity if everything does not go as planned.

What would be the recommended approach for safely rolling back the changes in case something goes wrong after the post migration?

2 Likes

Run the migration on a staging or test site.