-- Update existing users table to add blocking functionality
-- Run this script to add missing columns

USE flutter_auth_db;

-- Add blocking columns if they don't exist
ALTER TABLE users 
ADD COLUMN IF NOT EXISTS is_blocked BOOLEAN DEFAULT FALSE,
ADD COLUMN IF NOT EXISTS blocked_at TIMESTAMP NULL,
ADD COLUMN IF NOT EXISTS blocked_reason TEXT NULL;

-- Update existing users to have default values
UPDATE users SET is_blocked = FALSE WHERE is_blocked IS NULL;

-- Show updated table structure
DESCRIBE users;