← Back to team overview

openupgrade-drivers team mailing list archive

Re: [Question #240508]: On ERROR and database integrity on migration

 

Question #240508 on OpenUpgrade Server changed:
https://answers.launchpad.net/openupgrade-server/+question/240508

    Status: Open => Answered

Holger Brunn (Therp) proposed the following answer:
We patched the server so that every migration runs in one transaction.
The patch was necessary as some parts (mostly creating columns and such)
do a commit afterwards and a rollback in the case of an error. We
replaced that by savepoints.

And given that migrations run only once (he looks at the version
number), restarting a migration after fixing the problem you encountered
should just work.

We further patch the cursor class (in loading.py) so that calling
commit/rollback does nothing.

Do you encounter problems with that or is this rather a theoretical
question?

As for dry-runs: No, nothing like that up to now. That should be simple
to implement as a monkey patch in loading.py too, I guess.

-- 
You received this question notification because you are a member of
OpenUpgrade Drivers, which is an answer contact for OpenUpgrade Server.