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

9 lines
207 B
SQL

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