public renameColumn ( $table, $column, $newName ) | ||
$table | The table containing the column to be renamed | |
$column | The column to be renamed | |
$newName | The new name for the column |
function renameColumn($table, $column, $newName)
{
$f_schema = $this->_schema;
$this->fieldClean($f_schema);
$this->fieldClean($table);
$this->fieldClean($column);
$this->fieldClean($newName);
$sql = "ALTER TABLE \"{$f_schema}\".\"{$table}\" RENAME COLUMN \"{$column}\" TO \"{$newName}\"";
return $this->execute($sql);
}