bitque/jirs-server/migrations/2020-04-20-071751_add_roles/up.sql
2020-04-20 11:22:39 +02:00

9 lines
198 B
SQL

DROP TYPE IF EXISTS "UserRoleType" CASCADE;
CREATE TYPE "UserRoleType" AS ENUM (
'user',
'manager',
'owner'
);
ALTER TABLE users ADD COLUMN role "UserRoleType" DEFAULT 'user' NOT NULL;