$database->renameColumn() method

Rename a table column without changing type

Available since version 3.0.185.

Usage

$bool = $database->renameColumn(string $table, string $oldName, string $newName);

Arguments

NameType(s)Description
tablestring
oldNamestring
newNamestring

Return value

bool

Exceptions

Method can throw exceptions on error:

  • \PDOException


$database methods and properties

API reference based on ProcessWire core version 3.0.244

“The end client and designer love the ease at which they can update the website. Training beyond how to log in wasn’t even necessary since ProcessWire’s default interface is straightforward.” —Jonathan Lahijani