-- Add missing approval columns to users table
ALTER TABLE users ADD COLUMN approved_by_id CHAR(32) NULL;
ALTER TABLE users ADD COLUMN approved_at DATETIME(6) NULL;
ALTER TABLE users ADD COLUMN approval_reason TEXT NULL;
ALTER TABLE users ADD COLUMN rejection_reason TEXT NULL;
ALTER TABLE users ADD COLUMN approval_status VARCHAR(20) DEFAULT 'pending';

-- Add foreign key constraint
ALTER TABLE users ADD CONSTRAINT users_approved_by_id_fk FOREIGN KEY (approved_by_id) REFERENCES users(id);
