Directive - Rename Field
Details
Name: rename_field
Format: array of table and field names as keys, and new names as values
Description
Changes the name of a field on a specified table in the database.
Directives exist (Create, Drop, Alter) to handle creation and deletion of fields.
Example
'rename_field' => array(
'categories' => array(
'name' => 'title'
),
'emails' => array(
'error' => 'error_code',
'modified' => 'updated'
),
)
After the successful execution of the above rename_field directive, the following will have occurred:
- name field on the
categoriestable will be renamed totitle - error field on the
emailstable will be renamed toerror_code - modified field on the
emailstable will be renamed toupdated