diff options
author | Marks Polakovs <marks@markspolakovs.me> | 2023-05-17 14:53:48 +0100 |
---|---|---|
committer | Marks Polakovs <marks@markspolakovs.me> | 2023-05-17 14:58:41 +0100 |
commit | c210066e6da5c38a2589bd4fe30cf536e6469254 (patch) | |
tree | f76df130c7450db898dc364ea3645c8f69aed757 /maintenance/postgres/archives/patch-langlinks-pk.sql | |
parent | 49d8aac8dc261bbbe5103fd748b438e5222745f5 (diff) | |
download | mediawikicore-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.sql | 2 |
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); |