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
+25
View File
@@ -0,0 +1,25 @@
--P5-1636
INSERT INTO designer_texts (designerid, locale_id, header, description) (
SELECT
d.designerid,
l.id AS locale_id,
td_head.text AS header,
td_descr.text AS description
FROM
locales AS l
CROSS JOIN designers AS d
LEFT JOIN "i18n-texts" AS t_head ON t_head.name = d.path AND t_head.category = 'categoryH1_photo-wallpaper'
INNER JOIN "i18n-texts_data" AS td_head
ON t_head.textid = td_head.textid AND l.value = td_head.language || '_' || td_head.territory
LEFT JOIN "i18n-texts" AS t_descr
ON t_descr.name = d.path AND t_descr.category = 'categoryDescription_photo-wallpaper'
INNER JOIN "i18n-texts_data" AS td_descr
ON t_descr.textid = td_descr.textid AND l.value = td_descr.language || '_' || td_descr.territory
WHERE
td_head.text IS NOT NULL OR td_descr.text IS NOT NULL
)
ON CONFLICT DO NOTHING
;