Change the length of name in the algorithm
since we are updating the lenght of the lb_algorithm in pool table we need to change the name column in algorithm table as its a FK Closes-Bug:1536876 Change-Id: I1183da8e4effbf84c55618aa22b82dcc359b8623
This commit is contained in:
parent
820829d36b
commit
259538d92f
|
@ -29,5 +29,15 @@ import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
def upgrade():
|
def upgrade():
|
||||||
|
op.drop_constraint(
|
||||||
|
u'fk_pool_algorithm_name', u'pool',
|
||||||
|
type_=u'foreignkey'
|
||||||
|
)
|
||||||
|
op.alter_column(u'algorithm', u'name', nullable=False,
|
||||||
|
existing_type=sa.String(255))
|
||||||
op.alter_column(u'pool', u'lb_algorithm', nullable=False,
|
op.alter_column(u'pool', u'lb_algorithm', nullable=False,
|
||||||
existing_type=sa.String(255))
|
existing_type=sa.String(255))
|
||||||
|
op.create_foreign_key(
|
||||||
|
u'fk_pool_algorithm_name', u'pool',
|
||||||
|
u'algorithm', [u'lb_algorithm'], [u'name']
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in New Issue