summaryrefslogtreecommitdiffstats
path: root/nova/db
diff options
context:
space:
mode:
authorCory Wright <cory.wright@rackspace.com>2011-03-08 14:35:53 +0000
committerCory Wright <cory.wright@rackspace.com>2011-03-08 14:35:53 +0000
commitb8a0fdca4df454a4d60df40d06ebd82bcc2ba3da (patch)
tree80d2f054ac3c8ecf93541d598c71d89e22ea048f /nova/db
parent4937a1ec17beadb6e1737ac126adf68fd6dbf2c8 (diff)
downloadnova-b8a0fdca4df454a4d60df40d06ebd82bcc2ba3da.tar.gz
nova-b8a0fdca4df454a4d60df40d06ebd82bcc2ba3da.tar.xz
nova-b8a0fdca4df454a4d60df40d06ebd82bcc2ba3da.zip
* pep8 cleanups in migrations
* a few bugfixes
Diffstat (limited to 'nova/db')
-rw-r--r--nova/db/sqlalchemy/migrate_repo/versions/009_add_os_type_to_instances.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/nova/db/sqlalchemy/migrate_repo/versions/009_add_os_type_to_instances.py b/nova/db/sqlalchemy/migrate_repo/versions/009_add_os_type_to_instances.py
index a50f31e16..514b92b81 100644
--- a/nova/db/sqlalchemy/migrate_repo/versions/009_add_os_type_to_instances.py
+++ b/nova/db/sqlalchemy/migrate_repo/versions/009_add_os_type_to_instances.py
@@ -29,8 +29,6 @@ instances = Table('instances', meta,
Column('id', Integer(), primary_key=True, nullable=False),
)
-# FIXME(dubs) should this be not null? Maybe create as nullable, then
-# populate all existing rows with 'linux', then adding not null constraint.
instances_os_type = Column('os_type',
String(length=255, convert_unicode=False,
assert_unicode=None, unicode_error=None,
@@ -45,7 +43,7 @@ def upgrade(migrate_engine):
instances.create_column(instances_os_type)
migrate_engine.execute(instances.update()\
- .where(instances.c.os_type==None)\
+ .where(instances.c.os_type == None)\
.values(os_type='linux'))
@@ -53,4 +51,3 @@ def downgrade(migrate_engine):
meta.bind = migrate_engine
instances.drop_column('os_type')
-