Files
openccb/services/lms-service/migrations/20231222000002_add_roles.sql
T

6 lines
256 B
SQL

-- Add role column to users table for RBAC sync
ALTER TABLE users ADD COLUMN IF NOT EXISTS role TEXT NOT NULL DEFAULT 'student';
-- Add check constraint
ALTER TABLE users ADD CONSTRAINT check_valid_role CHECK (role IN ('admin', 'instructor', 'student'));