diff --git a/dsolovianov/postgresql/DDL.sql b/dsolovianov/postgresql/DDL.sql index a578b7b..0c7c3b1 100644 --- a/dsolovianov/postgresql/DDL.sql +++ b/dsolovianov/postgresql/DDL.sql @@ -30,7 +30,7 @@ CREATE TABLE dsolovianov.order_items ( product_id INT NOT NULL, quantity INT NOT NULL CHECK (quantity > 0), price_at_purchase DECIMAL(10,2) NOT NULL CHECK (price_at_purchase > 0), - CONSTRAINT order_items_pk PRIMARY KEY (order_id, product_id) + CONSTRAINT order_items_pk PRIMARY KEY (order_id, product_id), CONSTRAINT order_items_order_fk FOREIGN KEY (order_id) REFERENCES dsolovianov.orders(id), CONSTRAINT order_items_product_fk