Rails migration rollback scope: restoring schema without expecting deleted data back
Rollback scope after a schema change I am defining a rollback policy for a Rails application (assume a current Rails 7.x line with PostgreSQL) and need to pin down exactly what rails db:rollback is allowed to promise. Our migrations are written with change where possible, but some use remove_column , change_column , and occasionally execute for data cleanup.