library/Garp/Spawn/MySql/Table/Synchronizer.php
public function sync($removeRedundantColumns = true) {
        $target = $this->getTarget();
        $keysInSync = true;

        $configuredKeys = $this->_getConfiguredKeys();
        $keySyncer = new Garp_Spawn_MySql_Key_Set_Synchronizer(
            $configuredKeys,
            $target->keys,
            $this->getFeedback()
        );

        if (!$keySyncer->removeKeys()) {
            $keysInSync = false;
        }

        $colsInSync = $this->_syncColumns($target);

        $i18nTableFork = $this->_detectI18nTableFork();

        if ($i18nTableFork) {
            $dbManager = Garp_Spawn_MySql_Manager::getInstance($this->_feedback);
            $dbManager->onI18nTableFork($this->getModel());
        }

        if ($removeRedundantColumns) {
            $this->_deleteRedundantColumns();
        }

        if (!$keySyncer->addKeys() || !$keySyncer->modifyKeys()) {
            $keysInSync = false;
        }
        return $colsInSync && $keysInSync;
    }
public function sync($removeRedundantColumns = true) {
        $target = $this->getTarget();
        $keysInSync = true;

        $configuredKeys = $this->_getConfiguredKeys();
        $keySyncer = new Garp_Spawn_MySql_Key_Set_Synchronizer(
            $configuredKeys,
            $target->keys,
            $this->getFeedback()
        );

        if (!$keySyncer->removeKeys()) {
            $keysInSync = false;
        }

        $colsInSync = $this->_syncColumns($target);

        $i18nTableFork = $this->_detectI18nTableFork();

        if ($i18nTableFork) {
            $dbManager = Garp_Spawn_MySql_Manager::getInstance($this->_feedback);
            $dbManager->onI18nTableFork($this->getModel());
        }

        if ($removeRedundantColumns) {
            $this->_deleteRedundantColumns();
        }

        if (!$keySyncer->addKeys() || !$keySyncer->modifyKeys()) {
            $keysInSync = false;
        }
        return $colsInSync && $keysInSync;
    }
public function sync ( $ removeRedundantColumns = true ) { $ target = $ this -> getTarget ( ) ; $ keysInSync = true ; $ configuredKeys = $ this -> _getConfiguredKeys ( ) ; $ keySyncer = new Garp_Spawn_MySql_Key_Set_Synchronizer ( $ configuredKeys , $ target -> keys , $ this -> getFeedback ( ) ) ; if ( ! $ keySyncer -> removeKeys ( ) ) { $ keysInSync = false ; } $ colsInSync = $ this -> _syncColumns ( $ target ) ; $ i18nTableFork = $ this -> _detectI18nTableFork ( ) ; if ( $ i18nTableFork ) { $ dbManager = Garp_Spawn_MySql_Manager :: getInstance ( $ this -> _feedback ) ; $ dbManager -> onI18nTableFork ( $ this -> getModel ( ) ) ; } if ( $ removeRedundantColumns ) { $ this -> _deleteRedundantColumns ( ) ; } if ( ! $ keySyncer -> addKeys ( ) || ! $ keySyncer -> modifyKeys ( ) ) { $ keysInSync = false ; } return $ colsInSync && $ keysInSync ; }
Syncs source and target tables with one another, trying to resolve any conflicts.

@param  bool $removeRedundantColumns Whether to remove no longer configured columns. This
can be triggered separately with the cleanUp() method.
@return bool In sync
Syncs source and target tables with one another trying to resolve any conflicts .