On Thu, Mar 6, 2014 at 11:28 AM, Alex Hitchins
<alex.hitch...@shapeblue.com> wrote:
> I agree too with this approach. One thing I'm not too familiar with is how 
> the current SQL versioning handled? I know of the schema-xxtoxx sql files but 
> not so much how this are arranged.
>

H Alex,

The present upgrades are on a per release basis. This means that you
can upgrade from released versions to other released versions or the
present state of master. You can never upgrade from master or
downgrade or from some other random commit-state of the source.

The schema-xxxtoxxx are accompanying Upgradexxxtoxxx.java classes and
schema-xxxtoxxx-cleanup scripts. The DatabaseUpgradeChecker will find
which version you are at according to the db and then collect all of
those three categories between then and the ersion you want to got to.
Next it will first run all the schema-xxxtoxxx, then the
Upgradexxxtoxxx code for migration and finally the
schema-xxxtoxxx-cleanup for throwing away any old or temporary tables.
And it will then add entries to the version table to indicate what
just happened.
I'm not sure at what stage but this is not a single transaction anyway
(the cleanups  are a separate single transaction) so when it fails
midways, you are up for a restore and -try.

regards,
-- 
Daan

Reply via email to