mentorenwahl/docker/api/db/migrations/20220120165204_create_user_roles.sql
Dominic Grimm a9fc6a43b1
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
Renamed backend to api
2022-01-20 21:17:24 +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;