-- SQL script to update existing users to have the default 'user' role
-- Run this script if you're adding RBAC to an existing database

-- First, add the role column if it doesn't exist
ALTER TABLE users ADD COLUMN role ENUM('user', 'admin') NOT NULL DEFAULT 'user';

-- Optionally, you can set specific users as admins by ID
-- Uncomment and modify the following line to make specific users admins
-- UPDATE users SET role = 'admin' WHERE id IN (1, 2, 3);

-- Or make the first user an admin
-- UPDATE users SET role = 'admin' WHERE id = 1;