Dropping entire database every migration
This commit is contained in:
parent
7d21a572af
commit
19b6b05b69
1 changed files with 12 additions and 0 deletions
|
@ -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;
|
Loading…
Reference in a new issue