dbmigrate
dbmigrate copied to clipboard
Use savepoints to allow rerun failed scripts
When migration script contains a mistake, then part of commands get executed. The second attempt will rerun script from the beginning, which results in executing the commands for the second time. This behavior is wrong.
I guess we could wrap the SQL execution in transactions. People can already add it in the SQL file themselves but that does get repetitive and error prone.
I'll take a PR for it!
I can do it for sqlite, but I don't want to test it with other backends :)