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); } ?>
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é).
info, En trop = à revoir via Détails (jamais DELETE auto).
Source de vérité : dev préprod ().
Comparaison vers dev prod, client préprod et client prod.
| Table | Source |
$tabEnv) {
if (!empty($tabEnv['is_source'])) {
continue;
} ?>
|
|---|---|---|
|
ligne(s)
doublon(s) clé en source
|
$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');
?>
Cible · Source
Manque
· Diff
· En trop
0) { ?>
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) { ?>
dont poubelles · vrais textes |
Manque · Contenu différent · En trop en cible Fermer
0) { ?>Affichage limité à / .
0) { ?>Aucun écart à afficher.