Question

I'm adding one class nova.db.sqlalchemy.models to create associated table in Nova DB but its not reflecting there.

Doing same in neutron is creating a Table in Neutron DB.

Openstack documentation does not explains how to extend the database anywhere. http://docs.openstack.org/developer/nova/api/nova.db.sqlalchemy.models.html

How this issue can be resolved ?

Was it helpful?

Solution

you would also have to add migration file in nova/db/sqlalchemy/migrate_repo/versions/, after that do 'nova-manage db sync'. The new table should be reflected now. HTH

OTHER TIPS

  1. Create your model inside nova/db/sqlalchemy/models.py
  2. Create migration file inside nova/db/sqlalchemy/migrate_repo/versions/ .
    You can do this by simply adding a .py file with an increased version number
  3. Provide upgrade() and downgrade() functions as described in this pdf
  4. sync nova db using:

nova-manage db sync

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top