outdatedTableSuffix; $replicaTableName = $tableName . $this->additionalTableSuffix; $renameBatch = [ [ 'oldName' => $tableName, 'newName' => $outdatedTableName ], [ 'oldName' => $replicaTableName, 'newName' => $tableName ], [ 'oldName' => $outdatedTableName, 'newName' => $replicaTableName ] ]; $toRename = array_merge($toRename, $renameBatch); } if (!empty($toRename)) { $connection->renameTablesBatch($toRename); } } /** * @param string $tableName * @return string */ public function getAdditionalTableName($tableName) { return $tableName . $this->additionalTableSuffix; } }