[Openstack] Call for review: Make database downgrade works

Hengqing Hu hudayou at hotmail.com
Thu Feb 23 01:58:59 UTC 2012


To make database downgrade works in nova, we need review and approval on 
the following change:
https://review.openstack.org/3891

I hope, there is some number of kind people who can give me some +1s or
comments on them.

The rational behind this patch is:
1.Make data(metadat, table and column definition) local to 
upgrade/downgrade function,
so sqlalchemy-migrate python script load engine will not get the wrong 
state and generate fault.
Related code:
http://code.google.com/p/sqlalchemy-migrate/source/browse/migrate/versioning/script/py.py#121

2.Add sql scripts to work around various bugs in 
sqlalchemy/sqlalchemy-migrate to keep
compatibility with various versions of them.
Related issue:
http://code.google.com/p/sqlalchemy-migrate/issues/detail?id=143
http://code.google.com/p/sqlalchemy-migrate/issues/detail?id=94
http://code.google.com/p/sqlalchemy-migrate/issues/detail?id=72

3.Use sqlalchemy reflelction to reduce code lines and avoid change of 
the existing code in the future.

4.Add snake walk test case to assure the upgrade/downgrade works in some 
sense.

Currently, this patch has been tested with the following version 
combinations
of sqlalchemy/sqlalchemy-migrate on fedora 16 and ubuntu precise for 
sqlite in memory,
sqlite persistence, mysql, postgresql engines:
sqlalchemy-migrate==0.6.1
sqlalchemy==0.6.8

sqlalchemy-migrate==0.7.2
sqlalchemy==0.7.5

sqlalchemy-migrate==0.7.1
sqlalchemy==0.6.8

Since sqlalchemy-migrate 0.6.x is not aware of sqlalchemy 0.7.x changes, 
the combination is invalid.

Best Regards, Hengqing Hu




More information about the Openstack mailing list