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:
parent
7ef664a646
commit
70b03cadc3
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user