-- MSIN-4484 — Permission catalogue : hors propagation kit total -- Prérequis : inscriptions_eve_permissions (accès v2) -- Notes : exécution UNIQUEMENT sur dev préprod ; autres env = Navicat structure + sync_static_db -- Idempotent -- -- perm_grants_all = 1 (défaut) : incluse dans role_grants_all (comportement actuel) -- perm_grants_all = 0 : n’est PAS accordée automatiquement par un kit total ; -- seulement via matrice / extra explicite (ou gate hors catalogue) SET NAMES utf8mb4; SET @col_exists := ( SELECT COUNT(*) FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'inscriptions_eve_permissions' AND COLUMN_NAME = 'perm_grants_all' ); SET @sql := IF( @col_exists = 0, 'ALTER TABLE `inscriptions_eve_permissions` ADD COLUMN `perm_grants_all` tinyint(1) unsigned NOT NULL DEFAULT 1 COMMENT ''MSIN-4484 — 1 = incluse dans kit total (grants_all) ; 0 = non propagée'' AFTER `perm_actif`', 'SELECT ''perm_grants_all already exists'' AS info' ); PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt;