diff --git a/migrations/2023-09-24-104018_create_shifts/up.sql b/migrations/2023-09-24-104018_create_shifts/up.sql index 18a10c0..488db41 100644 --- a/migrations/2023-09-24-104018_create_shifts/up.sql +++ b/migrations/2023-09-24-104018_create_shifts/up.sql @@ -1,6 +1,6 @@ -CREATE TABLE shifts -( - id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, - start DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, - end DATETIME DEFAULT NULL -) +CREATE TABLE + shifts ( + id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, + start DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, + end DATETIME DEFAULT NULL + ) diff --git a/migrations/2023-09-30-201752_create_drinks/down.sql b/migrations/2023-09-30-201752_create_drinks/down.sql index e1bc95e..51f95ec 100644 --- a/migrations/2023-09-30-201752_create_drinks/down.sql +++ b/migrations/2023-09-30-201752_create_drinks/down.sql @@ -1,2 +1,2 @@ -- This file should undo anything in `up.sql` -DROP TABLE drinks +DROP TABLE drinks; diff --git a/migrations/2023-09-30-201752_create_drinks/up.sql b/migrations/2023-09-30-201752_create_drinks/up.sql index 422ea6b..169dbb4 100644 --- a/migrations/2023-09-30-201752_create_drinks/up.sql +++ b/migrations/2023-09-30-201752_create_drinks/up.sql @@ -1,10 +1,10 @@ -- Your SQL goes here -CREATE TABLE drinks -( - id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, - price INT UNSIGNED NOT NULL, - quantity INT UNSIGNED NOT NULL, - shift INT UNSIGNED NOT NULL, - time DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, - FOREIGN KEY (shift) REFERENCES shifts(id) ON DELETE CASCADE -) +CREATE TABLE + drinks ( + id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, + price INT UNSIGNED NOT NULL, + quantity INT UNSIGNED NOT NULL, + shift INT UNSIGNED NOT NULL, + time DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, + FOREIGN KEY (shift) REFERENCES shifts (id) ON DELETE CASCADE + )