Bug 682030

Summary: automated schema upgrades/downgrades
Product: [Retired] Beaker Reporter: Raymond Mancy <rmancy>
Component: schedulerAssignee: matt jia <mjia>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.6CC: asaha, bpeck, dcallagh, ebaak, jzhao, mcsontos, mjia, rmancy, stl, tools-bugs
Target Milestone: 19.0Keywords: FutureFeature, Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: Misc
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-25 07:18:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Raymond Mancy 2011-03-03 23:36:31 UTC
Currently, because is not easily upgradable/downgradable.

For example, we don't have an easy way to change and rollback schema changes.
Perhaps something like sqlalchemy-migrate could be used for this.

Comment 2 Dan Callaghan 2014-07-14 00:17:29 UTC
At this stage alembic is probably the project we want to use for this (rather than sqlalchemy-migrate):

https://bitbucket.org/zzzeek/alembic

Comment 3 Amit Saha 2014-07-18 02:05:25 UTC
http://gerrit.beaker-project.org/#/c/3212/

Comment 4 Dan Callaghan 2014-10-09 23:04:56 UTC
I also wrote an automated test for the migration process:

http://gerrit.beaker-project.org/3376

and back-populated the migrations to 0.12:

http://gerrit.beaker-project.org/3380

plus fixed a few random bugs in the existing migrations that shook out from the tests.

Comment 5 Dan Callaghan 2014-10-09 23:46:44 UTC
... and one more, to eliminate the manual stamping step on first upgrade. beaker-init will guess the right version by checking for certain tables/columns.

http://gerrit.beaker-project.org/3383

Comment 6 Dan Callaghan 2014-10-10 07:26:30 UTC
(In reply to Dan Callaghan from comment #5)
> ... and one more, to eliminate the manual stamping step on first upgrade.
> beaker-init will guess the right version by checking for certain
> tables/columns.
> 
> http://gerrit.beaker-project.org/3383

I discovered a problem with this patch, it doesn't correctly stamp the db after guessing the version.

http://gerrit.beaker-project.org/3399

Comment 9 Dan Callaghan 2014-11-25 07:18:13 UTC
Beaker 19.0 has been released.