cfwheels-dbmigrate-plugin icon indicating copy to clipboard operation
cfwheels-dbmigrate-plugin copied to clipboard

Failed migrations should rollback

Open tdm00 opened this issue 13 years ago • 1 comments

sometimes when creating a migration something fails and the whole migration should be rolled back like:

t = createTable(name='taggings',id=false);
t.integer('tagid');
t.integer('articleid');
t.timestamps();
t.create();

addRecord(table='taggings',tagid=1,columnNoExisit=1);
addRecord(table='taggings',tagid=4,articleid=1);

tdm00 avatar Sep 19 '11 20:09 tdm00

YES! +1 on this point. It's frustrating when something is half migrated because then it requires that the user figure out where it went wrong, then modify the migration pattern to either finish the job or undo the job by removing part of the code. Or, manually manipulating the database so that it's state is as the migration expects. None of which are ideal. Thanks for adding this to the list :)

geirman avatar Apr 25 '12 15:04 geirman