Skip to content

Commit

Permalink
Tools: migrate convert_database_vo MetaData to SQLA2.0; fix rucio#7390
Browse files Browse the repository at this point in the history
  • Loading branch information
rdimaio authored and bari12 committed Feb 10, 2025
1 parent 6b7176e commit 37cc33b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/convert_database_vo.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ def rename_vo(old_vo, new_vo, insert_new_vo=False, description=None, email=None,
conn = engine.connect()
trans = conn.begin()
inspector = reflection.Inspector.from_engine(engine)
metadata = MetaData(bind=conn, reflect=True)
metadata = MetaData()
metadata.reflect(bind=conn)
dialect = engine.dialect.name

# Gather all the columns that need updating and all relevant foreign key constraints
Expand Down Expand Up @@ -187,7 +188,8 @@ def remove_vo(vo, commit_changes=False, skip_history=False):
conn = engine.connect()
trans = conn.begin()
inspector = reflection.Inspector.from_engine(engine)
metadata = MetaData(bind=conn, reflect=True)
metadata = MetaData()
metadata.reflect(bind=conn)
dialect = engine.dialect.name

# Gather all the columns that need deleting and all relevant foreign key constraints
Expand Down

0 comments on commit 37cc33b

Please sign in to comment.