Archive old migrations (#426)

* Archive old migrations

* Fix invalid placement of migrations
This commit is contained in:
Rikard Bartholf
2024-10-17 11:19:12 +02:00
committed by GitHub
parent 763262c108
commit ddcbd0afb0
500 changed files with 0 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
-- P5-6103 Add i18n-texts_data.locale_id
ALTER TABLE "i18n-texts_data" ADD COLUMN locale_id INTEGER;
ALTER TABLE "i18n-texts_data"
ADD CONSTRAINT locale_fkey
FOREIGN KEY (locale_id)
REFERENCES locales(id) MATCH SIMPLE;
-- Populate locale ids
UPDATE "i18n-texts_data" SET locale_id = (SELECT id FROM locales WHERE value = language || '_' || territory);
-- Add not null constraint
ALTER TABLE "i18n-texts_data" ALTER COLUMN locale_id SET NOT NULL;