Dropping entire database every migration

This commit is contained in:
Imbus 2024-05-05 10:44:28 +02:00
parent 7d21a572af
commit 19b6b05b69

View file

@ -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;