1
# Copyright 2010 OpenStack LLC.
4
# Licensed under the Apache License, Version 2.0 (the "License"); you may
5
# not use this file except in compliance with the License. You may obtain
6
# a copy of the License at
8
# http://www.apache.org/licenses/LICENSE-2.0
10
# Unless required by applicable law or agreed to in writing, software
11
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13
# License for the specific language governing permissions and limitations
16
from sqlalchemy import *
19
from nova import log as logging
28
zones = Table('zones', meta,
29
Column('created_at', DateTime(timezone=False)),
30
Column('updated_at', DateTime(timezone=False)),
31
Column('deleted_at', DateTime(timezone=False)),
32
Column('deleted', Boolean(create_constraint=True, name=None)),
33
Column('id', Integer(), primary_key=True, nullable=False),
35
String(length=255, convert_unicode=False, assert_unicode=None,
36
unicode_error=None, _warn_on_bytestring=False)),
38
String(length=255, convert_unicode=False, assert_unicode=None,
39
unicode_error=None, _warn_on_bytestring=False)),
41
String(length=255, convert_unicode=False, assert_unicode=None,
42
unicode_error=None, _warn_on_bytestring=False)),
53
def upgrade(migrate_engine):
54
# Upgrade operations go here. Don't create your own engine;
55
# bind migrate_engine to your metadata
56
meta.bind = migrate_engine
57
for table in (zones, ):
61
logging.info(repr(table))