bitque/migrations/2020-04-20-071751_add_roles/up.sql

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;