Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Critical
-
Resolution: Duplicate
-
Labels:None
-
Environment:symfony 2.0.7
Description
Tried to use renameColumn() into one of my migration scripts and it dropped the table.
The code does not seem okay as well:
namespace Doctrine\DBAL\Schema;
..
class Table extends AbstractAsset
{
..
/**
* Rename Column
*
* @param string $oldColumnName
* @param string $newColumnName
* @return Table
*/
public function renameColumn($oldColumnName, $newColumnName)
{
$column = $this->getColumn($oldColumnName);
$this->dropColumn($oldColumnName);
$column->_setName($newColumnName);
return $this;
}
..
Doctrine\DBAL\Schema\Table is actually not a part of Doctrine Migrations, rather just the Database Abstraction Layer project. Recommend this gets sorted as such.