Merge "set allocation_pool_id nullable=False"

This commit is contained in:
Jenkins 2013-01-23 05:59:53 +00:00 committed by Gerrit Code Review
commit 8bc27b3304
2 changed files with 2 additions and 2 deletions

View File

@ -176,7 +176,7 @@ def upgrade_base():
op.create_table(
'ipavailabilityranges',
sa.Column('allocation_pool_id', sa.String(length=36), nullable=True),
sa.Column('allocation_pool_id', sa.String(length=36), nullable=False),
sa.Column('first_ip', sa.String(length=64), nullable=False),
sa.Column('last_ip', sa.String(length=64), nullable=False),
sa.ForeignKeyConstraint(['allocation_pool_id'],

View File

@ -50,7 +50,7 @@ class IPAvailabilityRange(model_base.BASEV2):
allocation_pool_id = sa.Column(sa.String(36),
sa.ForeignKey('ipallocationpools.id',
ondelete="CASCADE"),
nullable=True,
nullable=False,
primary_key=True)
first_ip = sa.Column(sa.String(64), nullable=False, primary_key=True)
last_ip = sa.Column(sa.String(64), nullable=False, primary_key=True)