diff --git a/php/inc_fx_static_sync.php b/php/inc_fx_static_sync.php index be6f367..a9dc986 100644 --- a/php/inc_fx_static_sync.php +++ b/php/inc_fx_static_sync.php @@ -249,11 +249,6 @@ function fxStaticSyncWriteAllowed($strEnvId) { return $strEnvId !== 'client_prod'; } -/** Environnements client : confirmation renforcée (nom de BD à retaper). */ -function fxStaticSyncRequiresDbConfirm($strEnvId) { - return ($strEnvId === 'client_preprod' || $strEnvId === 'client_prod'); -} - function fxStaticSyncFinalizeCompareResult(array $tabCmp) { if (in_array($tabCmp['status'], array('missing_table', 'schema_mismatch', 'no_connection'), true)) { return $tabCmp; diff --git a/php/sync_static_db.php b/php/sync_static_db.php index 7379c33..23f2a95 100644 --- a/php/sync_static_db.php +++ b/php/sync_static_db.php @@ -42,20 +42,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action']) && $_POST[' } elseif (!fxStaticSyncWriteAllowed($strEnvId)) { $strFlash = 'Sync désactivée vers client prod — comparaison seule.'; $strFlashType = 'bad'; - } elseif (fxStaticSyncRequiresDbConfirm($strEnvId)) { - $strConfirmDb = trim($_POST['confirm_db'] ?? ''); - $strExpectedDb = $tabEnv['config']['db'] ?? ''; - if ($strConfirmDb !== $strExpectedDb) { - $strFlash = 'Sync annulée — nom de base incorrect (attendu : ' . $strExpectedDb . ').'; - $strFlashType = 'bad'; - } else { - $blnDbConfirmed = true; - } } else { - $blnDbConfirmed = true; - } - - if (!empty($blnDbConfirmed)) { $tabConnections = fxStaticSyncOpenConnections(); $objSource = $tabConnections['dev_preprod']; $objTarget = $tabConnections[$strEnvId]; @@ -141,10 +128,8 @@ if ($strDetailTable !== '' && $strDetailEnv !== '') {

Sync tables statiques

Attention — opération destructive. - Sync = DELETE puis recopie complète depuis dev préprod. - Client prod : lecture seule (aucun bouton Sync). - Client préprod : confirmation avec le nom exact de la base. - Structures non alignées : corriger via Navicat avant toute sync. + Sync = recopie complète depuis dev préprod (efface la cible). + Client prod : lecture seule. Un clic sur Sync — pas de confirmation à taper.

Source de vérité : dev préprod (). @@ -198,7 +183,6 @@ if ($strDetailTable !== '' && $strDetailEnv !== '') { } $strClass = fxStaticSyncStatusClass($tabCmp['status']); $strLabel = fxStaticSyncStatusLabel($tabCmp['status'], $tabCmp); - $strDbName = $tabEnv['config']['db'] ?? ''; ?> @@ -218,12 +202,7 @@ if ($strDetailTable !== '' && $strDetailEnv !== '') { Détails -

+ @@ -295,43 +274,4 @@ if ($strDetailTable !== '' && $strDetailEnv !== '') { -