1
0
mirror of https://github.com/quay/quay.git synced 2025-04-18 10:44:06 +03:00

db: add postgresql_concurrently to subject backfill (PROJQUAY-7393) (#2979)

Adding postgresql_concurrently to subject backfill
This commit is contained in:
Brandon Caton 2024-06-27 09:10:46 -04:00 committed by GitHub
parent 7ef664a646
commit 70b03cadc3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,12 +19,14 @@ def upgrade(op, tables, tester):
inspector = Inspector.from_engine(bind)
manifest_indexes = inspector.get_indexes("manifest")
if not "manifest_subject_backfilled" in [i["name"] for i in manifest_indexes]:
op.create_index(
"manifest_subject_backfilled",
"manifest",
["subject_backfilled"],
unique=False,
)
with op.get_context().autocommit_block():
op.create_index(
"manifest_subject_backfilled",
"manifest",
["subject_backfilled"],
unique=False,
postgresql_concurrently=True,
)
def downgrade(op, tables, tester):