[openstack-dev] [Neutron][DB] neutron DB migration scripts

Henry Gessau gessau at cisco.com
Mon May 25 22:42:10 UTC 2015


On Mon, May 25, 2015, Mike Bayer <mbayer at redhat.com> wrote:
> On 5/25/15 10:24 AM, Henry Gessau wrote:
>> Yes, unfortunately the autogenerate currently generates commands to 
>> drop all the FWaaS, LBaaS and VPNaaS tables since their models are not 
>> in the neutron tree. You can and should delete all these commands that 
>> are not related to your new models. We have been meaning to fix the 
>> autogeneration so that it handles the *aaS tables correctly, but it is 
>> a little tricky. 
> I'm sure you know this already, but when you do this you should be using 
> the Alembic include_object hook:
> 
> http://alembic.readthedocs.org/en/latest/api.html?highlight=include_object#alembic.environment.EnvironmentContext.configure.params.include_object

I kind of knew about it, but I did not realize that I could hook it into the
env like that. Thanks!

> implementing this function will give you complete control over every 
> object considered by autogenerate.    I'm assuming the "tricky" part 
> here has to do with some unpredictability on the part of the Neutron 
> schema.  On the Alembic side it should be straightforward (e.g. there's 
> no need to manipulate the MetaData or anything like that).
> 
> Feel free to point me to a review dealing with this.

https://review.openstack.org/185465




More information about the OpenStack-dev mailing list