3 ms·
This issue is detectable, at least, to prevent cascading issues (it probably requires manual intervention to resolve though): You have a started and finished c
by stephenr 2y ago
This issue is detectable, at least, to prevent cascading issues (it probably requires manual intervention to resolve though):
You have a started and finished columns and/or a state column on your migrations table;
Insert into migrations;
Run migration foo;
Update migrations set finished = now, state = finished where migration = foo;
Then your deploy tool refuses to run (and reports an error) when there are any non-finished migrations found.
Honestly if your migrations need `if not exist` regularly for basic stuff like creating tables or whatnot something is wrong - it implies you can't rely on other migrations having been performed at which point you have no reasonable way to expect that the end result will be correct.