ltss icon indicating copy to clipboard operation
ltss copied to clipboard

DB might end up in an undefined state since there is no rollback on errors in the migration code

Open freol35241 opened this issue 2 years ago • 0 comments

A more general approach would likely be to wrap the entire set of upgrade changes to the db in a a BEGIN/COMMIT block, with a ROLLBACK in case of errors, so a robust way would be to autocommit=False for all sql, plus some code to handle the commit. Out of scope for this PR though.

That should (in theory) prevent the db from getting into an undefined state.

Originally posted by @antoonhuiskens in https://github.com/freol35241/ltss/issues/112#issuecomment-1649358473

freol35241 avatar Aug 09 '23 07:08 freol35241