Comment 3 for bug 1664575

Revision history for this message
Prabhat Ranjan (pranjank) wrote :

Can we add one column in 'instances' table?
i.e. 'partition_uuid'

Probably this code should work

from nova.db.sqlalchemy import api
query = "ALTER TABLE instances ADD COLUMN partition_uuid VARCHAR(32)"
engine = api.get_engine()
res = engine.execute(query)

I tried reading value from 'services' table it worked fine.
e.g.
from nova.db.sqlalchemy import api
query = "select * from services"
engine = api.get_engine()
res = engine.execute(query)
row = res.fetchone()
LOG.debug("first row %(row)s"%{"row": row})

But still I have to try adding column.