Re: [openstack-dev] Help with sql upgrade and downgrade

2014-08-20 Thread Murali Balcha
Thanks for the help Mathieu. Now I know why that script exists :) On 8/20/14, 6:55 PM, "Mathieu Gagné" wrote: >On 2014-08-20 6:42 PM, Murali Balcha wrote: >> >> I can successfully add string column parent_id without any problem. >> However adding a boolean column is vexing. Adding a boolean colu

Re: [openstack-dev] Help with sql upgrade and downgrade

2014-08-20 Thread Mathieu Gagné
On 2014-08-20 6:42 PM, Murali Balcha wrote: I can successfully add string column parent_id without any problem. However adding a boolean column is vexing. Adding a boolean column adds a check constraint on the table but when I remove the column in the downgrade, the check constraint for snapshot

[openstack-dev] Help with sql upgrade and downgrade

2014-08-20 Thread Murali Balcha
Hi, I am trying to add two new columns to backups table in cinder. I created the new version file as follows: from sqlalchemy import Column, MetaData, String, Table, Boolean def upgrade(migrate_engine): meta = MetaData() meta.bind = migrate_engine backups = Table('backups', me