aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/postgres/archives/patch-langlinks-pk.sql
diff options
context:
space:
mode:
authorMarks Polakovs <marks@markspolakovs.me>2023-05-17 14:53:48 +0100
committerMarks Polakovs <marks@markspolakovs.me>2023-05-17 14:58:41 +0100
commitc210066e6da5c38a2589bd4fe30cf536e6469254 (patch)
treef76df130c7450db898dc364ea3645c8f69aed757 /maintenance/postgres/archives/patch-langlinks-pk.sql
parent49d8aac8dc261bbbe5103fd748b438e5222745f5 (diff)
downloadmediawikicore-c210066e6da5c38a2589bd4fe30cf536e6469254.tar.gz
mediawikicore-c210066e6da5c38a2589bd4fe30cf536e6469254.zip
Improve idempotency of postgres index upgrades
Change DROP INDEX statements to DROP INDEX IF EXISTS, meaning the upgrade does not fail if they do not already exist (which is the desired end state anyway). Bug: T336868 Change-Id: Id073beda84065b067994a7405a78d484346b550d
Diffstat (limited to 'maintenance/postgres/archives/patch-langlinks-pk.sql')
-rw-r--r--maintenance/postgres/archives/patch-langlinks-pk.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/maintenance/postgres/archives/patch-langlinks-pk.sql b/maintenance/postgres/archives/patch-langlinks-pk.sql
index b3a6ea21febd..1a345a5fd5cf 100644
--- a/maintenance/postgres/archives/patch-langlinks-pk.sql
+++ b/maintenance/postgres/archives/patch-langlinks-pk.sql
@@ -1,3 +1,3 @@
-DROP INDEX langlinks_unique;
+DROP INDEX IF EXISTS langlinks_unique;
ALTER TABLE langlinks
ADD PRIMARY KEY (ll_from,ll_lang);