-- ========================================
-- Photo Upload Fix
-- Adds missing photos column to assessment_risks table
-- ========================================

USE risk_assessment_db;

-- Add photos column to assessment_risks if it doesn't exist
ALTER TABLE assessment_risks 
ADD COLUMN IF NOT EXISTS photos JSON NULL COMMENT 'Array of photo filenames attached to this risk item';

-- Verify the column was added
SELECT 'Photo column added successfully!' as Status;

-- Show updated table structure
DESCRIBE assessment_risks;
