wiki.techinc.nl/maintenance/postgres/archives/patch-l10n_cache-pk.sql
Marks Polakovs c210066e6d 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
2023-05-17 14:58:41 +01:00

3 lines
104 B
SQL

DROP INDEX IF EXISTS l10n_cache_lc_lang_key;
ALTER TABLE l10n_cache
ADD PRIMARY KEY (lc_lang, lc_key);