cfwheels-dbmigrate-plugin
cfwheels-dbmigrate-plugin copied to clipboard
Failed migrations should rollback
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);
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 :)