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-303: Updated functionality of sales tab in society product
CREATE TABLE wallpapertypes
(
id SERIAL NOT NULL,
name VARCHAR(255),
CONSTRAINT wallpapertypes_pkey PRIMARY KEY (id)
);
INSERT INTO wallpapertypes (name) VALUES ('wall_mural'), ('design_wallpaper');
CREATE TABLE product_wallpapertypes
(
product_id INT NOT NULL,
wallpapertype_id INT NOT NULL,
CONSTRAINT product_wallpapertypes_pkey PRIMARY KEY (product_id, wallpapertype_id),
CONSTRAINT wallpapertypes_id_fkey FOREIGN KEY (wallpapertype_id)
REFERENCES wallpapertypes (id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE CASCADE,
CONSTRAINT "product-products_productid_fkey" FOREIGN KEY (product_id)
REFERENCES "product-products" (productid) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE CASCADE
);