-- Add can_upload field to EventVolunteerRoles table
-- This field controls whether a volunteer can upload files
-- Default is 'Y' (yes) to maintain backward compatibility

ALTER TABLE EventVolunteerRoles 
ADD COLUMN can_upload ENUM('Y', 'N') DEFAULT 'Y' AFTER is_active;

-- Add index for performance
ALTER TABLE EventVolunteerRoles 
ADD INDEX idx_can_upload (can_upload);

-- Update existing records to allow uploads by default (maintain current behavior)
UPDATE EventVolunteerRoles SET can_upload = 'Y' WHERE can_upload IS NULL;






