Directive - Alter Field

Details

Name: alter_field

Format: array of partial Migration Table specifications.

Description

Changes the field properties in an existing table.

Note that partial table specifications are passed, which is a subset of a full array of Table data.

These are the fields that are to be modified as part of the operation.

If you wish to leave some fields untouched, simply exclude them from the Table spec for the alter operation.

Directives exist (Create, Drop, Rename) to handle other field operations.

Example


'alter_field' => array(
	'categories' => array(
		'indexes' => array(
			'NAMES' => false,
			'NAME' => array(
				'column' => 'name',
				'unique' => 0),
		)
	)
),

This changes the indexes on the categories table.