github.com/oinume/lekcije@v0.0.0-20231017100347-5b4c5eb6ab24/backend/db/migrations/20160830215400_create_lesson.sql (about) 1 -- +goose Up 2 -- SQL in section 'Up' is executed when this migration is applied 3 CREATE TABLE IF NOT EXISTS lesson ( 4 `teacher_id` int unsigned NOT NULL, 5 `datetime` datetime NOT NULL, 6 `status` enum('finished', 'reserved', 'available', 'cancelled') NOT NULL, 7 `created_at` datetime NOT NULL, 8 `updated_at` datetime NOT NULL, 9 PRIMARY KEY (`teacher_id`,`datetime`) 10 ) ROW_FORMAT=DYNAMIC; 11 12 -- +goose Down 13 -- SQL section 'Down' is executed when this migration is rolled back 14 DROP TABLE IF EXISTS lesson;