Commit 9b0bd881 authored by Benjamin Eberlei's avatar Benjamin Eberlei

Remove Doctrine\DBAL\Table\Schema#renameColumn()

parent 4eaa44c0
# Upgrade to 2.3 # Upgrade to 2.3
## Doctrine\DBAL\Schema\Table#renameColumn() removed
Doctrine\DBAL\Schema\Table#renameColumn() was removed, because it drops and recreates
the column instead. There is no fix available, because a schema diff
cannot reliably detect if a column was renamed or one column was created
and another one dropped.
## Schema Filter paths ## Schema Filter paths
The Filter Schema assets expression is not wrapped in () anymore for the regexp. The Filter Schema assets expression is not wrapped in () anymore for the regexp automatically.
Before: Before:
......
...@@ -270,11 +270,9 @@ class Table extends AbstractAsset ...@@ -270,11 +270,9 @@ class Table extends AbstractAsset
*/ */
public function renameColumn($oldColumnName, $newColumnName) public function renameColumn($oldColumnName, $newColumnName)
{ {
$column = $this->getColumn($oldColumnName); throw new DBALException("Table#renameColumn() was removed, because it drops and recreates " .
$this->dropColumn($oldColumnName); "the column instead. There is no fix available, because a schema diff cannot reliably detect if a " .
"column was renamed or one column was created and another one dropped.");
$column->_setName($newColumnName);
return $this;
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment