/**
* Renames the underlying database structure for this field.
*
* @param string $strNewColumnName The new column name.
*
* @return void
*/
public function renameColumn($strNewColumnName)
{
TableManipulation::checkColumnName($strNewColumnName);
if ($this->getColName() && $this->getMetaModel()->getServiceContainer()->getDatabase()->fieldExists($this->getColName(), $this->getMetaModel()->getTableName(), true)) {
TableManipulation::renameColumn($this->getMetaModel()->getTableName(), $this->getColName(), $strNewColumnName, $this->getSQLDataType());
} else {
$strBackupColName = $this->getColName();
$this->set('colname', $strNewColumnName);
$this->createColumn();
$this->set('colname', $strBackupColName);
}
}