diff --git a/app/Migrations/create-schema.sql b/app/Migrations/create-schema.sql index a5c85a1..b0aee90 100644 --- a/app/Migrations/create-schema.sql +++ b/app/Migrations/create-schema.sql @@ -1,3 +1,13 @@ +PRAGMA foreign_keys = OFF; + +-- Drop everything... +DROP TABLE IF EXISTS pallets; +DROP TABLE IF EXISTS raw_materials_deliveries; +DROP TABLE IF EXISTS raw_materials; +DROP TABLE IF EXISTS orders; +DROP TABLE IF EXISTS customers; +DROP TABLE IF EXISTS cookies; + -------------------------------------------- -- Recipe/Cookie related tables -------------------------------------------- @@ -63,3 +73,5 @@ CREATE TABLE IF NOT EXISTS pallets ( FOREIGN KEY (cookie_id) REFERENCES cookies(cookie_id) -- FOREIGN KEY (order_id) REFERENCES orders(order_id) ); + +PRAGMA foreign_keys = ON; \ No newline at end of file