-- Update user status enum to include new moderation statuses
ALTER TYPE user_status ADD VALUE 'warning';
ALTER TYPE user_status ADD VALUE 'suspended';
ALTER TYPE user_status ADD VALUE 'banned';
ALTER TYPE user_status ADD VALUE 'under_review';

-- Drop the old constraint if it exists
ALTER TABLE users DROP CONSTRAINT IF EXISTS users_status_check;

-- Add the new constraint
ALTER TABLE users ADD CONSTRAINT users_status_check 
CHECK (status IN ('active', 'warning', 'suspended', 'banned', 'under_review', 'pending', 'deactivated'));
