sql formatting pass
parent
a74808859d
commit
d56686fc03
|
@ -1,6 +1,6 @@
|
||||||
CREATE TABLE shifts
|
CREATE TABLE
|
||||||
(
|
shifts (
|
||||||
id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
|
id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
|
||||||
start DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
start DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
||||||
end DATETIME DEFAULT NULL
|
end DATETIME DEFAULT NULL
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
-- This file should undo anything in `up.sql`
|
-- This file should undo anything in `up.sql`
|
||||||
DROP TABLE drinks
|
DROP TABLE drinks;
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
-- Your SQL goes here
|
-- Your SQL goes here
|
||||||
CREATE TABLE drinks
|
CREATE TABLE
|
||||||
(
|
drinks (
|
||||||
id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
|
id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
|
||||||
price INT UNSIGNED NOT NULL,
|
price INT UNSIGNED NOT NULL,
|
||||||
quantity INT UNSIGNED NOT NULL,
|
quantity INT UNSIGNED NOT NULL,
|
||||||
shift INT UNSIGNED NOT NULL,
|
shift INT UNSIGNED NOT NULL,
|
||||||
time DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
time DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
||||||
FOREIGN KEY (shift) REFERENCES shifts(id) ON DELETE CASCADE
|
FOREIGN KEY (shift) REFERENCES shifts (id) ON DELETE CASCADE
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue