Model |
View |
Controller |
Migration
cfrails.Migration
Component Migration
Creates tables / columns as defined by the derivative components
create_table
|
public
create_table
(
required string
tableName,
required struct
columns,
string
orderedColumnsList=""
)
Creates a table with the specified columns. It will automatically create an autonumber column called id for the primary key.
Output: supressed
Parameters:
tableName:
string, required, tableName - The name of the table to be created
columns:
struct, required, columns - A structure where the keys are the column names, and the values are their types.
orderedColumnsList:
string, optional, orderedColumnsList - A list of the columns' names in the order in which they should be created.
|
down
|
public
down
(
)
This method must be overridden by the derivative components, and it should be used to drop the table
Output: enabled
|
drop_table
|
public
drop_table
(
required string
tableName
)
Drops the specified table
Output: supressed
Parameters:
tableName:
string, required, tableName - The name of the table to be dropped
|
init
|
public
init
(
)
Initializes the newly created object of class Migration
Output: enabled
|
up
|
public
up
(
)
This method must be overridden by the derivative components, and it should be used to create the table
Output: enabled
|
|
Me
|