15 lines
352 B
MySQL
15 lines
352 B
MySQL
|
-- +micrate Up
|
||
|
-- SQL in section 'Up' is executed when this migration is applied
|
||
|
CREATE TYPE user_roles AS ENUM ('Admin', 'Teacher', 'Student');
|
||
|
|
||
|
ALTER TABLE
|
||
|
users
|
||
|
ADD
|
||
|
COLUMN role user_roles NOT NULL;
|
||
|
|
||
|
-- +micrate Down
|
||
|
-- SQL section 'Down' is executed when this migration is rolled back
|
||
|
ALTER TABLE
|
||
|
users DROP COLUMN role;
|
||
|
|
||
|
DROP TYPE user_roles;
|