sql formatting pass
parent
a74808859d
commit
d56686fc03
|
@ -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
|
||||
)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
-- This file should undo anything in `up.sql`
|
||||
DROP TABLE drinks
|
||||
DROP TABLE drinks;
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue