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

9 lines
207 B
MySQL
Raw Permalink Normal View History

2023-04-01 22:31:57 +02:00
DROP TYPE IF EXISTS "UserRoleMapping" CASCADE;
CREATE TYPE "UserRoleMapping" AS ENUM (
'user',
'manager',
'owner'
);
2023-04-01 22:31:57 +02:00
ALTER TABLE users ADD COLUMN role "UserRoleMapping" DEFAULT 'user' NOT NULL;