[openstack-dev] [Cinder] Query on adding new table to cinder DB

Duncan Thomas duncan.thomas at gmail.com
Tue Apr 14 08:27:10 UTC 2015


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 <e0ne at e0ne.info> 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 <dpkshetty at gmail.com>
> 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:
>> OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>


-- 
Duncan Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150414/66a61dcf/attachment.html>


More information about the OpenStack-dev mailing list