summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Kölker <jason@koelker.net>2011-05-23 13:06:55 -0500
committerJason Kölker <jason@koelker.net>2011-05-23 13:06:55 -0500
commit15a02b247436ba71c4f64a8ac8d79b32cc8883f1 (patch)
treed5588a30af7d5665980a9c69b32ad26414e06a2f
parentefad5e4f1475c77e0dadadc6fad8cf3ca485fd32 (diff)
make the migration run with tests
-rw-r--r--nova/db/sqlalchemy/migrate_repo/versions/015_multi_nic.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/nova/db/sqlalchemy/migrate_repo/versions/015_multi_nic.py b/nova/db/sqlalchemy/migrate_repo/versions/015_multi_nic.py
index b07576df3..fffcda29f 100644
--- a/nova/db/sqlalchemy/migrate_repo/versions/015_multi_nic.py
+++ b/nova/db/sqlalchemy/migrate_repo/versions/015_multi_nic.py
@@ -45,6 +45,16 @@ mac_addresses = Table('mac_addresses', meta,
nullable=False),
)
+# Don't autoload this table since sqlite will have issues when
+# adding the column
+fixed_ips = Table('fixed_ips', meta,
+ Column('id', Integer(), primary_key=True),
+ Column('address', String(255)),
+ Column('network_id', Integer(), ForeignKey('networks.id'),
+ nullable=True),
+ Column('instance_id', Integer(), ForeignKey('instances.id'),
+ nullable=True),
+ )
# bridge_interface column to add to networks table
interface = Column('bridge_interface',
@@ -66,7 +76,6 @@ def upgrade(migrate_engine):
# grab tables and (column for dropping later)
instances = Table('instances', meta, autoload=True)
- fixed_ips = Table('fixed_ips', meta, autoload=True)
networks = Table('networks', meta, autoload=True)
c = instances.columns['mac_address']