DO $$
BEGIN
    IF NOT EXISTS (
        SELECT 1 FROM information_schema.columns
        WHERE table_name='ohs_inspections' AND column_name='form_data'
    ) THEN
        ALTER TABLE ohs_inspections
            ADD COLUMN IF NOT EXISTS form_data jsonb DEFAULT NULL;
    END IF;
END $$;
