github.com/oinume/lekcije@v0.0.0-20231017100347-5b4c5eb6ab24/backend/db/migrations/20180301050000_alter_teacher_add_rating.sql (about)

     1  -- +goose Up
     2  -- SQL in section 'Up' is executed when this migration is applied
     3  ALTER TABLE teacher
     4    ADD COLUMN `review_count` int unsigned NOT NULL DEFAULT 0 AFTER `favorite_count`,
     5    ADD COLUMN `rating` DECIMAL(2, 1) DEFAULT 0.0 AFTER `review_count`;
     6  
     7  -- +goose Down
     8  -- SQL section 'Down' is executed when this migration is rolled back
     9  ALTER TABLE teacher DROP COLUMN `review_count`, DROP COLUMN `rating`;