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 @@
CREATE TABLE prod_to_delete AS
SELECT productid FROM "product-products_fields"
WHERE fieldid=36 AND value='batch1202';
DELETE FROM "product-products_fields"
WHERE productid IN (SELECT productid FROM prod_to_delete);
DELETE FROM "collections_products"
WHERE product_id IN (SELECT productid FROM prod_to_delete);
DELETE FROM "product-products"
WHERE productid IN (SELECT productid FROM prod_to_delete);
DROP TABLE prod_to_delete;