false, 'message' => 'Réservé à info.'); } else { $tabResult = fxStaticSyncRemoveInfoExtraPoubelle($objSource, $objTarget, $tabDef); } } else { $tabResult = fxStaticSyncApplyContentUpdates($objSource, $objTarget, $strTable, $tabDef); } if ($tabResult['ok']) { $tabVerify = fxStaticSyncCompareEnvPair($objSource, $objTarget, $tabDef); $strMsg = $tabDef['label'] . ' → ' . $tabEnv['label'] . ' : ' . $tabResult['message']; $intExtra = count($tabVerify['extra_keys']); $intMiss = count($tabVerify['missing_keys']); $intDiff = count($tabVerify['diff_keys']); $strMsg .= ' Après : manque ' . $intMiss . ', contenu diff. ' . $intDiff . ', en trop (conservés) ' . $intExtra . '.'; if ($intMiss === 0 && $intDiff === 0 && $tabVerify['status'] === 'ok') { fxStaticSyncSetFlash($strMsg, 'ok'); } elseif ($intMiss === 0 && $intDiff === 0) { fxStaticSyncSetFlash($strMsg . ' Écarts restants = revue manuelle (pas de DELETE).', 'ok'); } else { fxStaticSyncSetFlash($strMsg, 'ok'); } } else { fxStaticSyncSetFlash( $tabDef['label'] . ' → ' . $tabEnv['label'] . ' — échec : ' . $tabResult['message'], 'bad' ); } } } } } header('Location: sync_static_db.php#sync-result'); exit; } $tabConnections = fxStaticSyncOpenConnections(); $tabEnvs = fxStaticSyncEnvironmentDefinitions(); $tabReport = fxStaticSyncBuildReport($tabConnections); $strDetailTable = trim($_GET['detail_table'] ?? ''); $strDetailEnv = trim($_GET['detail_env'] ?? ''); $tabDetail = null; if ($strDetailTable !== '' && $strDetailEnv !== '') { $tabDetail = fxStaticSyncGetDiffDetail($strDetailTable, $strDetailEnv, $tabConnections); } ?> Sync tables statiques (soft) — CON-333

Sync tables statiques — mode soft (CON-333)

Aucun DELETE. On n’efface jamais un vrai libellé info seulement en cible. Les poubelles info en trop (texte = clé) : bouton dédié pour les retirer. Catalogues accès v2 : Retirer en trop (sauf rôle encore utilisé).
Test complet (un environnement à la fois)
  1. Rafraîchir cette page (nouveau code déployé).
  2. Cliquer TOUT APPLIQUER sous la colonne voulue (commencer par Dev prod).
  3. Lire le message vert/rouge en haut : succès ou échec + détail table par table.
  4. Recharger : Manque=0 et Diff=0. Sur accès v2, En trop aussi → 0 (retirés auto). Sur info, En trop = à revoir via Détails (jamais DELETE auto).
  5. Lignes SAUTÉES (structure / table absente) = à corriger en Navicat, puis re-cliquer.

Source de vérité : dev préprod (). Comparaison vers dev prod, client préprod et client prod.

Données alignées Il en manque X Il y en a X en trop Contenu différent Structures non alignées Table absente / connexion
$tabEnv) { if (!empty($tabEnv['is_source'])) { continue; } ?> $tabEnv) { if (!empty($tabEnv['is_source'])) { continue; } $tabCmp = isset($tabRow['envs'][$strEnvId]) ? $tabRow['envs'][$strEnvId] : null; if (!$tabCmp) { continue; } $strClass = fxStaticSyncStatusClass($tabCmp['status']); $strLabel = fxStaticSyncStatusLabel($tabCmp['status'], $tabCmp); $intMissing = isset($tabCmp['missing_keys']) ? count($tabCmp['missing_keys']) : 0; $intExtra = isset($tabCmp['extra_keys']) ? count($tabCmp['extra_keys']) : 0; $intDiff = isset($tabCmp['diff_keys']) ? count($tabCmp['diff_keys']) : 0; $intPoubExtra = isset($tabCmp['poubelle_extra_keys']) ? count($tabCmp['poubelle_extra_keys']) : 0; $intRealExtra = isset($tabCmp['real_extra_keys']) ? count($tabCmp['real_extra_keys']) : 0; $blnCanRemoveExtras = !empty($tabDef['allow_remove_extras']); $blnCanWrite = ($tabCmp['status'] !== 'no_connection' && $tabCmp['status'] !== 'schema_mismatch' && $tabCmp['status'] !== 'missing_table' && $tabCmp['status'] !== 'error'); ?>
Table Source


ligne(s)
doublon(s) clé en source
Cible · Source
Manque · Diff · En trop 0) { ?>
dont poubelles · vrais textes
isset($tabCmp['schema_missing_cols']) ? $tabCmp['schema_missing_cols'] : array(), 'extra_in_target' => isset($tabCmp['schema_extra_cols']) ? $tabCmp['schema_extra_cols'] : array(), ); $strSchemaDiff = fxStaticSyncFormatSchemaDiff($tabSchemaDiff); if ($strSchemaDiff !== '') { ?>
Détails
0) { ?>
0) { ?>
0) { ?>
0) { ?>

Détails —

Manque · Contenu différent · En trop en cible Fermer

0) { ?>

En trop en cible () — explications

count($tabExtraSamples)) { ?>

Affichage limité à / .

0) { ?>

Manquants ()

0 && $intDiff > 0) { ?>

Contenu différent ()

Aucun écart à afficher.