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

     1  -- +goose Up
     2  -- SQL in section 'Up' is executed when this migration is applied
     3  ALTER TABLE m_plan
     4    ADD COLUMN `max_following_teacher` TINYINT unsigned NOT NULL DEFAULT 0 AFTER `show_ad`;
     5  
     6  BEGIN;
     7  UPDATE m_plan SET max_following_teacher = 10 WHERE id = 1 /* Free */;
     8  UPDATE m_plan SET max_following_teacher = 15 WHERE id = 2 /* Bronze */;
     9  UPDATE m_plan SET max_following_teacher = 15 WHERE id = 3 /* Silver */;
    10  UPDATE m_plan SET max_following_teacher = 20 WHERE id = 4 /* Gold */;
    11  UPDATE m_plan SET max_following_teacher = 15 WHERE id = 5 /* Silver Beta */;
    12  COMMIT;
    13  
    14  -- +goose Down
    15  -- SQL section 'Down' is executed when this migration is rolled back
    16  ALTER TABLE m_plan DROP COLUMN `max_following_teacher`;