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:

  1. name field on the categories table will be renamed to title
  2. error field on the emails table will be renamed to error_code
  3. modified field on the emails table will be renamed to updated