src/proxy/ClientTable.php
protected function cleanup($sqlMode)
    {
        if (Yii::$app->db->schema instanceof \yii\db\mysql\Schema) {
            Yii::$app->db->createCommand('SET FOREIGN_KEY_CHECKS = 1;')->execute();
            Yii::$app->db->createCommand('SET UNIQUE_CHECKS = 1;')->execute();

            if ($sqlMode !== null) {
                Yii::$app->db->createCommand('SET SQL_MODE=:sqlMode;', [':sqlMode' => $sqlMode])->execute();
            }
        }
    }
protected function cleanup($sqlMode)
    {
        if (Yii::$app->db->schema instanceof \yii\db\mysql\Schema) {
            Yii::$app->db->createCommand('SET FOREIGN_KEY_CHECKS = 1;')->execute();
            Yii::$app->db->createCommand('SET UNIQUE_CHECKS = 1;')->execute();

            if ($sqlMode !== null) {
                Yii::$app->db->createCommand('SET SQL_MODE=:sqlMode;', [':sqlMode' => $sqlMode])->execute();
            }
        }
    }
protected function cleanup ( $ sqlMode ) { if ( Yii :: $ app -> db -> schema instanceof \ yii \ db \ mysql \ Schema ) { Yii :: $ app -> db -> createCommand ( 'SET FOREIGN_KEY_CHECKS = 1;' ) -> execute ( ) ; Yii :: $ app -> db -> createCommand ( 'SET UNIQUE_CHECKS = 1;' ) -> execute ( ) ; if ( $ sqlMode !== null ) { Yii :: $ app -> db -> createCommand ( 'SET SQL_MODE=:sqlMode;' , [ ':sqlMode' => $ sqlMode ] ) -> execute ( ) ; } } }
Revert database system variables.

Enable the foreign key and unique check. Also set the sql mode to the given value.
Currently only for MySql and MariaDB.

@param $sqlMode string|null The old sql mode value from @see \luya\admin\proxy\ClientTable::prepare()
@see \luya\admin\proxy\ClientTable::prepare()
@throws \yii\db\Exception
@since 1.2.1
Revert database system variables .