Merge "Fix migration scripts with SQLAlchemy 2.0"
This commit is contained in:
commit
0c004ecbb2
@ -54,8 +54,8 @@ def upgrade():
|
||||
sa.ForeignKey('load_balancer.id'), nullable=True))
|
||||
|
||||
# Populate this new column appropriately
|
||||
select_obj = sa.select([listener.c.load_balancer_id,
|
||||
listener.c.default_pool_id]).where(
|
||||
select_obj = sa.select(listener.c.load_balancer_id,
|
||||
listener.c.default_pool_id).where(
|
||||
listener.c.default_pool_id is not None)
|
||||
result = conn.execute(select_obj)
|
||||
for row in result:
|
||||
|
@ -43,7 +43,7 @@ def migrate_pools():
|
||||
|
||||
j = pool_table.join(lb_table,
|
||||
pool_table.c.load_balancer_id == lb_table.c.id)
|
||||
stmt = sa.select([pool_table.c.id]).select_from(j).where(
|
||||
stmt = sa.select(pool_table.c.id).select_from(j).where(
|
||||
lb_table.c.provider == 'ovn')
|
||||
result = conn.execute(stmt)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user