Method Details

addColumn() method (available since v1.1.6)

the table that the new column will be added to. The table name will be properly quoted by the method.

$column

string

the name of the new column. The name will be properly quoted by the method.

$type

string

the column type. The getColumnType method will be invoked to convert abstract column type (if any) into the physical one. Anything that is not recognized as abstract type will be kept in the generated SQL. For example, 'string' will be turned into 'varchar(255)', while 'string not null' will become 'varchar(255) not null'.

alterColumn() method (available since v1.1.6)

the table whose column is to be changed. The table name will be properly quoted by the method.

$column

string

the name of the column to be changed. The name will be properly quoted by the method.

$type

string

the new column type. The getColumnType method will be invoked to convert abstract column type (if any) into the physical one. Anything that is not recognized as abstract type will be kept in the generated SQL. For example, 'string' will be turned into 'varchar(255)', while 'string not null' will become 'varchar(255) not null'.

Resets the sequence value of a table's primary key. The sequence will be reset such that the primary key of the next new row inserted will have the specified value or max value of a primary key plus one (i.e. sequence trimming).