node-migrate
node-migrate copied to clipboard
create table, index/primary_key breaking
If you create a table and then set an index for a row that doesn't exist, the migration will fail. The table will still be in the DB but you will not be able to rollback. If you change the index to a legit name and re-migrate you'll get an error that says that that table is already in use.
I can make the problem work by starting the migration with: this.drop_table('table_name');
But, it seems like .drop_table should either be part of .create_table or the migrate shouldn't keep the table when an error occurs. The later would probably be ideal.
Thanks again for a great module.
Let me take a look into this and the other issue you raised. Thanks for finding them!