This project is archived and is in readonly mode.

#834 ✓resolved
Ian Bailey

Make migrations use transaction and rollback if something was wrong

Reported by Ian Bailey | August 14th, 2008 @ 07:58 PM | in 2.x

When a migration is running and an error is raised, everything before the error is applied to the database schema and everything before (obviously) doesn't. Also, the migration version is stored as executed, which creates schema inconsistency and migration version control brokeness.

This would not work for migrations involving schema changes on databases that do not support DDL rollback (i.e. MySQL, Oracle).

This ticket was in Trac ticket 5470 but was not resovled. There are working patches on that ticket.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Referenced by

Pages