From d56686fc030a4473c5dc65288e3e3b0581f9c87d Mon Sep 17 00:00:00 2001 From: Zynh0722 Date: Sat, 4 Nov 2023 02:43:12 -0700 Subject: [PATCH] sql formatting pass --- .../2023-09-24-104018_create_shifts/up.sql | 12 ++++++------ .../2023-09-30-201752_create_drinks/down.sql | 2 +- .../2023-09-30-201752_create_drinks/up.sql | 18 +++++++++--------- 3 files changed, 16 insertions(+), 16 deletions(-) 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 + )