Skip to content

Commit

Permalink
Fix database migration when database has no multidimensional entity c…
Browse files Browse the repository at this point in the history
…lasses (#339)
  • Loading branch information
soininen authored Jan 24, 2024
2 parents 782b041 + 74d39ad commit e4945db
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ def upgrade():
metadata.reflect(bind=conn)
dimension_table = metadata.tables["entity_class_dimension"]
dimensional_class_ids = {row.entity_class_id for row in session.query(dimension_table)}
if not dimensional_class_ids:
return
metadata.reflect(bind=conn)
class_table = metadata.tables["entity_class"]
update_statement = (
Expand Down

0 comments on commit e4945db

Please sign in to comment.