Skip to main content

Posts

Showing posts from July, 2015

Adding a table to the openstack databases using migration scripts

So I had a task of adding a new table to the neutron database and at the same time not to use the neutron's migration script, as we wanted to keep the neutron code pure. I tried to google for the alembic data migration but could not find anything useful. So I started to reverse engineer the migration scripts of the other Openstack projects. I used the db code base from the following link. https://github.com/stackforge/group-based-policy/tree/stable/juno/gbpservice/neutron/db So I ll just mention the modifications we need to do to make it work. Please note that I am doing these changes in the Devstack environment. 1. Create folders for new project. Lets say we are building a new project called test_db. Add a folder named test_db as shown in the below location /opt/stack/test_db/test_db/ (Yes 2 folders just to keep in sync with Devstack Arch) 2. Copy migration folder from the below link to  /opt/stack/test_db/test_db/ https://github.com/stackforge/group-based-policy/t