abstract class Migration

Migration factory.

Implements some handy shortcuts for creating typical migrations.

Methods

static array
createTable(string $name, callable $definition)

No description

static array
createTableIfNotExists(string $name, callable $definition)

No description

static array
renameTable(string $from, string $to)

No description

static array
addColumns(string $tableName, array $columnDefinitions)

No description

static array
dropColumns(string $tableName, array $columnDefinitions)

No description

static array
renameColumn(string $tableName, string $from, string $to)

No description

static array
renameColumns(string $tableName, array $columnNames)

No description

static array
addSettings(array $defaults)

<p>Add default values for config values.</p>

static array
addPermissions(array $permissions)

No description

Details

static array createTable(string $name, callable $definition)

Parameters

string $name
callable $definition

Return Value

array

static array createTableIfNotExists(string $name, callable $definition)

Parameters

string $name
callable $definition

Return Value

array

static array renameTable(string $from, string $to)

Parameters

string $from
string $to

Return Value

array

static array addColumns(string $tableName, array $columnDefinitions)

Parameters

string $tableName
array $columnDefinitions

Return Value

array

static array dropColumns(string $tableName, array $columnDefinitions)

Parameters

string $tableName
array $columnDefinitions

Return Value

array

static array renameColumn(string $tableName, string $from, string $to)

Parameters

string $tableName
string $from
string $to

Return Value

array

static array renameColumns(string $tableName, array $columnNames)

Parameters

string $tableName
array $columnNames

Return Value

array

static array addSettings(array $defaults)

<p>Add default values for config values.</p>

<p>You generally should use the Settings extender's <code>default</code> method instead to register settings.</p>

Parameters

array $defaults

Return Value

array

See also

Settings::default

static array addPermissions(array $permissions)

Parameters

array $permissions

Return Value

array