src/proxy/ClientTable.php
public function syncData()
    {
        if (Yii::$app->controller->interactive && $this->getRows() > self::LARGE_TABLE_PROMPT) {
            if (Console::confirm("{$this->getName()} has {$this->getRows()} entries. Do you want continue table sync?", true) === false) {
                return;
            }
        }

        $sqlMode = $this->prepare();

        try {
            Yii::$app->db->createCommand()->truncateTable($this->getName())->execute();

            $this->syncDataInternal();
        } finally {
            $this->cleanup($sqlMode);
        }
    }
public function syncData()
    {
        if (Yii::$app->controller->interactive && $this->getRows() > self::LARGE_TABLE_PROMPT) {
            if (Console::confirm("{$this->getName()} has {$this->getRows()} entries. Do you want continue table sync?", true) === false) {
                return;
            }
        }

        $sqlMode = $this->prepare();

        try {
            Yii::$app->db->createCommand()->truncateTable($this->getName())->execute();

            $this->syncDataInternal();
        } finally {
            $this->cleanup($sqlMode);
        }
    }
public function syncData ( ) { if ( Yii :: $ app -> controller -> interactive && $ this -> getRows ( ) > self :: LARGE_TABLE_PROMPT ) { if ( Console :: confirm ( "{$this->getName()} has {$this->getRows()} entries. Do you want continue table sync?" , true ) === false ) { return ; } } $ sqlMode = $ this -> prepare ( ) ; try { Yii :: $ app -> db -> createCommand ( ) -> truncateTable ( $ this -> getName ( ) ) -> execute ( ) ; $ this -> syncDataInternal ( ) ; } finally { $ this -> cleanup ( $ sqlMode ) ; } }
Sync the data from remote table to local table.

@throws \yii\db\Exception
Sync the data from remote table to local table .