Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 9b0bd8817cb74c4aefba043c7e59f94641cc5b15 1 parent 4eaa44c
@beberlei beberlei authored
Showing with 11 additions and 6 deletions.
  1. +8 −1 UPGRADE
  2. +3 −5 lib/Doctrine/DBAL/Schema/Table.php
View
9 UPGRADE
@@ -1,8 +1,15 @@
# Upgrade to 2.3
+## Doctrine\DBAL\Schema\Table#renameColumn() removed
+
+Doctrine\DBAL\Schema\Table#renameColumn() was removed, because it drops and recreates

Maybe add that users can use explicit SQL in their migration file to migrate the data?

@beberlei Owner

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+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
-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:
View
8 lib/Doctrine/DBAL/Schema/Table.php
@@ -270,11 +270,9 @@ public function addColumn($columnName, $typeName, array $options=array())
*/
public function renameColumn($oldColumnName, $newColumnName)
{
- $column = $this->getColumn($oldColumnName);
- $this->dropColumn($oldColumnName);
-
- $column->_setName($newColumnName);
- return $this;
+ throw new DBALException("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.");
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.