Ticket #212 (closed defect: fixed)
Make sure that any data changed in a dry-run gets rolled back
|Reported by:||juan@…||Owned by:||andrew|
This ticket is related to #138.
In a forwards or backwards migration, MySQL first tests the migration with a dry run phase.
Although we could wrap data manipulation in if not db.dry_run: , this is error-prone because people will just forget to do it. Especially if we want migrations to be portable across databases, because testing on a SqlLite? database won't expose these errors on a MySQL one.
The attached patch causes the dry run phase to rollback any data manipulation before actually applying the migration.