diff --git a/migrations/000.283.sql b/migrations/000.283.sql new file mode 100644 index 0000000..026ebc2 --- /dev/null +++ b/migrations/000.283.sql @@ -0,0 +1,16 @@ +-- P5-6282: use text tags for category translations + +insert into "i18n-texts" (name, category) + select slug, 'article_categories' from article_categories; + + +insert into "i18n-texts_data" (textid, text, locale_id) + select + (select textid from "i18n-texts" where name = article_categories.slug and category = 'article_categories'), + article_categories_translations.name, + (select locale_id from market_locales where market_id = article_categories_translations.market_id) + from article_categories_translations + join article_categories on article_categories_translations.category_id = article_categories.id; + + +drop table article_categories_translations;