Uncomment orders

This commit is contained in:
Imbus 2024-05-05 07:25:10 +02:00
parent 35607ce341
commit 71687c8bf7

View file

@ -52,13 +52,14 @@ CREATE TABLE IF NOT EXISTS raw_materials_deliveries (
-------------------------------------------- --------------------------------------------
-- Pallets are used to store cookies for delivery -- Pallets are used to store cookies for delivery
-- Order related columns are unused for now.
CREATE TABLE IF NOT EXISTS pallets ( CREATE TABLE IF NOT EXISTS pallets (
pallet_id INT PRIMARY KEY, pallet_id INT PRIMARY KEY,
cookie_id INT NOT NULL, cookie_id INT NOT NULL,
order_id INT NOT NULL, -- order_id INT NOT NULL,
status VARCHAR(50) NOT NULL CHECK (status IN ('freezer', 'delivered', 'blocked')), status VARCHAR(50) NOT NULL CHECK (status IN ('freezer', 'delivered', 'blocked')),
production_date DATE NOT NULL, production_date DATE NOT NULL,
delivery_date DATE DEFAULT NULL, delivery_date DATE DEFAULT NULL,
FOREIGN KEY (cookie_id) REFERENCES cookies(cookie_id) FOREIGN KEY (cookie_id) REFERENCES cookies(cookie_id)
FOREIGN KEY (order_id) REFERENCES orders(order_id) -- FOREIGN KEY (order_id) REFERENCES orders(order_id)
); );