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
+14
View File
@@ -0,0 +1,14 @@
-- Recreate v_esales_product_categories as a regular view
-- Below is output of \d+ v_esales_product_categories
CREATE VIEW v_esales_product_categories_unmaterialized AS
SELECT DISTINCT tree.id,
tree.locale_id,
getsafexmlpath(tree.path::character varying, 2) AS path,
category_texts.name,
product_category.product_id
FROM product_category
JOIN categories ON product_category.category_id = categories.id
JOIN categories hidden_category ON hidden_category.name::text = 'hidden'::text
JOIN v_esales_categorytree_i18n tree ON (tree.lft < categories.lft AND tree.rgt > categories.rgt OR categories.id = tree.id) AND tree.id <> 1 AND (tree.lft < hidden_category.lft OR tree.lft > hidden_category.rgt)
JOIN category_texts ON tree.id = category_texts.category_id AND tree.locale_id = category_texts.locale_id;