summaryrefslogtreecommitdiffstats
path: root/nova/db
diff options
context:
space:
mode:
authorRick Harris <rconradharris@gmail.com>2011-09-21 16:00:53 -0500
committerRick Harris <rconradharris@gmail.com>2011-09-21 16:00:53 -0500
commit4fb602fcbc2a7b0681e79454fe7c3f01110b1f0e (patch)
tree1c5c5f7ded02c886f48d5e2fa008881c7f0ebdc1 /nova/db
parent748b056209947032735c71212b8be21a16f2cadf (diff)
parent9cf7352fbd26fe8db4205c385b92778603af7797 (diff)
Renumbering instance progress migration
Diffstat (limited to 'nova/db')
-rw-r--r--nova/db/sqlalchemy/migrate_repo/versions/048_add_zone_name.py35
-rw-r--r--nova/db/sqlalchemy/migrate_repo/versions/049_add_instances_progress.py (renamed from nova/db/sqlalchemy/migrate_repo/versions/048_add_instances_progress.py)0
-rw-r--r--nova/db/sqlalchemy/models.py1
3 files changed, 36 insertions, 0 deletions
diff --git a/nova/db/sqlalchemy/migrate_repo/versions/048_add_zone_name.py b/nova/db/sqlalchemy/migrate_repo/versions/048_add_zone_name.py
new file mode 100644
index 000000000..3198e48a9
--- /dev/null
+++ b/nova/db/sqlalchemy/migrate_repo/versions/048_add_zone_name.py
@@ -0,0 +1,35 @@
+# Copyright 2011 OpenStack LLC.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+from sqlalchemy import Column, Integer, MetaData, String, Table
+
+meta = MetaData()
+
+zones = Table('zones', meta,
+ Column('id', Integer(), primary_key=True, nullable=False),
+ )
+
+name = Column('name', String(255))
+
+
+def upgrade(migrate_engine):
+ meta.bind = migrate_engine
+
+ zones.create_column(name)
+
+
+def downgrade(migrate_engine):
+ meta.bind = migrate_engine
+
+ zones.drop_column(name)
diff --git a/nova/db/sqlalchemy/migrate_repo/versions/048_add_instances_progress.py b/nova/db/sqlalchemy/migrate_repo/versions/049_add_instances_progress.py
index d23d52e80..d23d52e80 100644
--- a/nova/db/sqlalchemy/migrate_repo/versions/048_add_instances_progress.py
+++ b/nova/db/sqlalchemy/migrate_repo/versions/049_add_instances_progress.py
diff --git a/nova/db/sqlalchemy/models.py b/nova/db/sqlalchemy/models.py
index b7a35f881..2261a1d09 100644
--- a/nova/db/sqlalchemy/models.py
+++ b/nova/db/sqlalchemy/models.py
@@ -839,6 +839,7 @@ class Zone(BASE, NovaBase):
"""Represents a child zone of this zone."""
__tablename__ = 'zones'
id = Column(Integer, primary_key=True)
+ name = Column(String(255))
api_url = Column(String(255))
username = Column(String(255))
password = Column(String(255))