Skip to content

Commit

Permalink
Merge pull request #260 from MerginMaps/fix-jsons-migration-newer-dep…
Browse files Browse the repository at this point in the history
…loyments

Fix migration for deployment with automatically created indexes
  • Loading branch information
MarcelGeo authored Aug 5, 2024
2 parents e239854 + 2bb2f03 commit 9b3f10c
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,16 @@ def upgrade():
op.drop_column("project_version", "changes")

# harmonize constraint name
op.drop_constraint("uq_project_id_version", "project_version", type_="unique")
conn.execute(
sa.text(
"ALTER TABLE project_version DROP CONSTRAINT IF EXISTS uq_project_id_version;"
)
)
conn.execute(
sa.text(
"ALTER TABLE project_version DROP CONSTRAINT IF EXISTS uq_project_version_project_id;"
)
)

# trim 'v' prefix and convert to integer
conn.execute(
Expand Down

0 comments on commit 9b3f10c

Please sign in to comment.