1 # Copyright 2015 OpenStack Foundation
3 # Licensed under the Apache License, Version 2.0 (the "License"); you may
4 # not use this file except in compliance with the License. You may obtain
5 # a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 # License for the specific language governing permissions and limitations
18 Revision ID: 599c6a226151
20 Create Date: 2015-03-08 18:12:08.962378
24 # revision identifiers, used by Alembic.
25 revision = '599c6a226151'
26 down_revision = '354db87e3225'
28 from alembic import op
29 import sqlalchemy as sa
35 sa.Column('id', sa.String(length=36), nullable=False),
36 sa.Column('neutron_subnet_id', sa.String(length=36), nullable=True),
37 sa.PrimaryKeyConstraint('id'))
41 sa.Column('ip_address', sa.String(length=64), nullable=False),
42 sa.Column('status', sa.String(length=36), nullable=True),
43 sa.Column('ipam_subnet_id', sa.String(length=36), nullable=False),
44 sa.ForeignKeyConstraint(['ipam_subnet_id'],
47 sa.PrimaryKeyConstraint('ip_address', 'ipam_subnet_id'))
50 'ipamallocationpools',
51 sa.Column('id', sa.String(length=36), nullable=False),
52 sa.Column('ipam_subnet_id', sa.String(length=36), nullable=False),
53 sa.Column('first_ip', sa.String(length=64), nullable=False),
54 sa.Column('last_ip', sa.String(length=64), nullable=False),
55 sa.ForeignKeyConstraint(['ipam_subnet_id'],
58 sa.PrimaryKeyConstraint('id'))
61 'ipamavailabilityranges',
62 sa.Column('allocation_pool_id', sa.String(length=36), nullable=False),
63 sa.Column('first_ip', sa.String(length=64), nullable=False),
64 sa.Column('last_ip', sa.String(length=64), nullable=False),
65 sa.ForeignKeyConstraint(['allocation_pool_id'],
66 ['ipamallocationpools.id'],
68 sa.PrimaryKeyConstraint('allocation_pool_id', 'first_ip', 'last_ip'),
69 sa.Index('ix_ipamavailabilityranges_first_ip_allocation_pool_id',
70 'first_ip', 'allocation_pool_id'),
71 sa.Index('ix_ipamavailabilityranges_last_ip_allocation_pool_id',
72 'last_ip', 'allocation_pool_id'))