-- 013_fix_dossiers_columns.sql
-- Correction : colonnes manquantes sur dossiers (012 partiellement appliqué)
-- Idempotente

ALTER TABLE dossiers ADD COLUMN IF NOT EXISTS franchisee_payment_confirmed_at TIMESTAMP NULL;
ALTER TABLE dossiers ADD COLUMN IF NOT EXISTS franchisee_payment_proof_url TEXT NULL;
ALTER TABLE dossiers ADD COLUMN IF NOT EXISTS franchisee_reminder_count INTEGER NOT NULL DEFAULT 0;
ALTER TABLE dossiers ADD COLUMN IF NOT EXISTS franchisee_last_reminder_at TIMESTAMP NULL;
ALTER TABLE dossiers ADD COLUMN IF NOT EXISTS admin_overdue_notified_at TIMESTAMP NULL;
