mentorenwahl/docker/backend/db/migrations/20220120165204_create_user_roles.sql
Dominic Grimm 5bc10f8aaf
Some checks failed
continuous-integration/drone/push Build is failing
Added worker
2022-01-23 09:12:57 +01:00

15 lines
352 B
SQL

-- +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;