wiki.techinc.nl/maintenance/postgres/archives/patch-l10n_cache-pk.sql
Amir Sarabadani 5e69ad1aad Migrate l10n_cache and module_deps to abstract schema
Also, fixing two data type drifts in Postgres:
 - lc_key was varchar (with no binary flag) in MySQL but TEXT in
   Postgres while PG supports varchar. Changing PG to varchar.
 - lc_value was BYTEA but the rest of varbinary fields are mapped to
   TEXT, changing it to TEXT data type.

And fixing primary key of these tables in Postgres too as it was a unique index instead.

Bug: T198811
Bug: T164898
Bug: T230428
Change-Id: I50305556bd870461d05f98c5272cf1d6a65deb15
2020-08-06 22:07:22 +02:00

3 lines
94 B
SQL

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