-- ============================================
-- Migration 0015: Ajout historique des pauses
-- Date: 2026-01-28
-- ============================================

IF OBJECT_ID('Interventions', 'U') IS NOT NULL
BEGIN
    IF NOT EXISTS (
        SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS
        WHERE TABLE_NAME = 'Interventions' AND COLUMN_NAME = 'historique_pauses'
    )
    BEGIN
        ALTER TABLE Interventions ADD historique_pauses NVARCHAR(MAX) NULL;
        PRINT 'Colonne historique_pauses ajoutee a la table Interventions';
    END
    ELSE
    BEGIN
        PRINT 'Colonne historique_pauses existe deja dans la table Interventions';
    END
END
