Issue #2388067 by david_garcia: getQualifiedMapTableName is database specific logic out of the database driver
parent
f144ac6e7a
commit
b79c650836
|
@ -317,6 +317,20 @@ abstract class Connection implements \Serializable {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a fully qualified table name.
|
||||
*
|
||||
* @param string $table
|
||||
* The name of the table in question.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getFullQualifiedTableName($table) {
|
||||
$options = $this->getConnectionOptions();
|
||||
$prefix = $this->tablePrefix($table);
|
||||
return $options['database'] . '.' . $prefix . $table;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares a query string and returns the prepared statement.
|
||||
*
|
||||
|
@ -922,7 +936,7 @@ abstract class Connection implements \Serializable {
|
|||
// in question has already been accidentally committed.
|
||||
if (!isset($this->transactionLayers[$savepoint_name])) {
|
||||
throw new TransactionNoActiveException();
|
||||
}
|
||||
}
|
||||
|
||||
// We need to find the point we're rolling back to, all other savepoints
|
||||
// before are no longer needed. If we rolled back other active savepoints,
|
||||
|
|
|
@ -207,10 +207,7 @@ class Sql extends PluginBase implements MigrateIdMapInterface {
|
|||
* The fully qualified map table name.
|
||||
*/
|
||||
public function getQualifiedMapTableName() {
|
||||
$database = $this->getDatabase();
|
||||
$options = $database->getConnectionOptions();
|
||||
$prefix = $database->tablePrefix($this->mapTableName);
|
||||
return $options['database'] . '.' . $prefix . $this->mapTableName;
|
||||
return $this->getDatabase()->getFullQualifiedTableName($this->mapTableName);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue