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
+27
View File
@@ -0,0 +1,27 @@
CREATE TABLE collections
(
id serial NOT NULL,
name character varying(255) NOT NULL,
inserted timestamp with time zone NOT NULL DEFAULT now(),
updated timestamp with time zone,
designer_id integer NOT NULL,
path character varying(255) NOT NULL,
CONSTRAINT collections_pkey PRIMARY KEY (id),
CONSTRAINT collections_designer_id_fkey FOREIGN KEY (designer_id)
REFERENCES designers (designerid) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE CASCADE
);
CREATE TABLE collections_products
(
id serial NOT NULL,
collection_id integer NOT NULL,
product_id integer,
CONSTRAINT collections_products_pkey PRIMARY KEY (id),
CONSTRAINT collections_products_collection_id_fkey FOREIGN KEY (collection_id)
REFERENCES collections (id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE CASCADE,
CONSTRAINT collections_products_product_id_fkey FOREIGN KEY (product_id)
REFERENCES "product-products" (productid) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE CASCADE
);