There's also, where relevant, 'fix up the object code so that it does something sensible before the migration is run'. The value of 'something sensible' depends very heavily on your code.
On 13 April 2015 at 22:33, Ivan Kolodyazhny <[email protected]> wrote: > Hi Deepak, > > Your steps look good for e except #3.1 - add unit-tests for new migrations > > Regards, > Ivan Kolodyazhny > > On Mon, Apr 13, 2015 at 8:20 PM, Deepak Shetty <[email protected]> > wrote: > >> Hi Stackers, >> As part of my WIP work for implementing >> https://blueprints.launchpad.net/nova/+spec/volume-snapshot-improvements >> I am required to add a new table to cinder (snapshot_admin_metadata) and I >> was looking for some inputs on whats are the steps to add a new table to >> existing DB >> >> From what I know: >> >> 1) Create a new migration script at >> cinder/db/sqlalchemy/migrate_repo/versions >> >> 2) Implement the upgrade and downgrade methods >> >> 3) Create your model inside cinder/db/sqlalchemy/models.py >> >> 4) Sync DB using cinder-manage db sync >> >> Are these steps correct ? >> >> thanx, >> deepak >> >> __________________________________________________________________________ >> OpenStack Development Mailing List (not for usage questions) >> Unsubscribe: >> [email protected]?subject:unsubscribe >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev >> >> > > __________________________________________________________________________ > OpenStack Development Mailing List (not for usage questions) > Unsubscribe: [email protected]?subject:unsubscribe > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev > > -- Duncan Thomas
__________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: [email protected]?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
