Oil\Generate_Migration_Actions Handles actions for generating migrations in Oil

package Fuel
subpackage Oil
category Core
author Tom Arnfeld, Harro Verton

 Methods

Generate the up and down migration code for adding a field to a table

add($subjects, $fields) : \Oil\array(up,

oil command: add_{thing}to{tablename}

Parameters

$subjects

array

$fields

array

Returns

\Oil\array(up,down)

Generate the up and down migration code for table creation

create($subjects, $fields) : \Oil\array(up,

oil command: create_{tablename}

Parameters

$subjects

array

$fields

array

Returns

\Oil\array(up,down)

Generate the up and down migration code for deleting a field from a table

delete($subjects, $fields) : \Oil\array(up,

oil command: delete_{thing}from{tablename}

Parameters

$subjects

array

$fields

array

Returns

\Oil\array(up,down)

Generate the up and down migration code for table deletion

drop($subjects, $fields) : \Oil\array(up,

oil command: drop_{tablename}

Parameters

$subjects

array

$fields

array

Returns

\Oil\array(up,down)

Generate the up and down migration code for deleting a field from a table

rename_field($subjects, $fields) : \Oil\array(up,

oil command: rename_field_{fieldname}to{newfieldname}in{table}

Parameters

$subjects

array

$fields

array

Returns

\Oil\array(up,down)

Generate the up and down migration code for deleting a field from a table

rename_table($subjects, $fields) : \Oil\array(up,

oil command: rename_table_{tablename}to{newtablename}

Parameters

$subjects

array

$fields

array

Returns

\Oil\array(up,down)

generate the field definitions for up, down, and indexes

_generate_field_string($fields) 

Parameters

$fields