Anonymous Login
2021-05-14 03:24 PDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000681Pending RequestsCore Infrastructurepublic2014-08-16 18:21
Assigned To 
Product Version 
Target VersionFixed in Version 
Summary0000681: Renaming a column with DBQuery
DescriptionThere is no way to change the name of database field with Query.class.php.
This can be usefull when upgrading an addon module.
The alterField method doesn't accept a new name for the field.

I suggest this :

 * Alter a field definition for usage with table alteration
 * @param $name The name of the field
 * @param $type The type of the field
 * @param $newname The new name of the field (optional)
public function alterField($name, $type, $newname='') {
  if (!$newname) {
    $newname = $name;
  if (!is_array($this->create_definition)) {
    $this->create_definition = array();
  $this->create_definition[] = array('action' => 'CHANGE', 'type' => '', 'spec' => $name . ' ' . $newname. ' ' . $type);
TagsNo tags attached.
Attached Files


There are no notes attached to this issue.

-Issue History
Date Modified Username Field Change
2011-01-02 04:21 eureka New Issue
2011-01-02 12:41 caseydk Project v2.2 Release (Closed) => Pending Requests
2014-08-16 18:21 caseydk Category General => Core Infrastructure
+Issue History