set allocation_pool_id nullable=False
fixes bug 1103216 SQL Primary Keys cannot be null, so this patch fixes an inconsistency between the models and SQL. The databases were correcting this automatically, so a migration is not required. Change-Id: I724294580de9b86a2edfd4fdc6907e9469b6c552
This commit is contained in:
parent
a900f2d0bd
commit
6ebf3c0a48
@ -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'],
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user