ChangeColumn

class ChangeColumn (View source)

Methods

static array compile(Grammar $grammar, Blueprint $blueprint, Fluent $command, Connection $connection)

Compile a change column command into a series of SQL statements.

static TableDiff|bool getChangedDiff(Grammar $grammar, Blueprint $blueprint, AbstractSchemaManager $schema)

Get the Doctrine table difference for the given changes.

static Table getTableWithColumnChanges(Blueprint $blueprint, Table $table)

Get a copy of the given Doctrine table after making the column changes.

static Column getDoctrineColumn(Table $table, Fluent $fluent)

Get the Doctrine column instance for a column change.

static array getDoctrineColumnChangeOptions(Fluent $fluent)

Get the Doctrine column change options.

static Type getDoctrineColumnType(string $type)

Get the doctrine column type.

static int calculateDoctrineTextLength(string $type)

Calculate the proper column length to force the Doctrine text type.

static string|null mapFluentOptionToDoctrine(string $attribute)

Get the matching Doctrine option for a given Fluent attribute name.

static mixed mapFluentValueToDoctrine(string $option, mixed $value)

Get the matching Doctrine value for a given Fluent attribute.

Details

static array compile(Grammar $grammar, Blueprint $blueprint, Fluent $command, Connection $connection)

Compile a change column command into a series of SQL statements.

Parameters

Grammar $grammar
Blueprint $blueprint
Fluent $command
Connection $connection

Return Value

array

Exceptions

RuntimeException

static protected TableDiff|bool getChangedDiff(Grammar $grammar, Blueprint $blueprint, AbstractSchemaManager $schema)

Get the Doctrine table difference for the given changes.

Parameters

Grammar $grammar
Blueprint $blueprint
AbstractSchemaManager $schema

Return Value

TableDiff|bool

static protected Table getTableWithColumnChanges(Blueprint $blueprint, Table $table)

Get a copy of the given Doctrine table after making the column changes.

Parameters

Blueprint $blueprint
Table $table

Return Value

Table

static protected Column getDoctrineColumn(Table $table, Fluent $fluent)

Get the Doctrine column instance for a column change.

Parameters

Table $table
Fluent $fluent

Return Value

Column

static protected array getDoctrineColumnChangeOptions(Fluent $fluent)

Get the Doctrine column change options.

Parameters

Fluent $fluent

Return Value

array

static protected Type getDoctrineColumnType(string $type)

Get the doctrine column type.

Parameters

string $type

Return Value

Type

static protected int calculateDoctrineTextLength(string $type)

Calculate the proper column length to force the Doctrine text type.

Parameters

string $type

Return Value

int

static protected string|null mapFluentOptionToDoctrine(string $attribute)

Get the matching Doctrine option for a given Fluent attribute name.

Parameters

string $attribute

Return Value

string|null

static protected mixed mapFluentValueToDoctrine(string $option, mixed $value)

Get the matching Doctrine value for a given Fluent attribute.

Parameters

string $option
mixed $value

Return Value

mixed

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.7/Illuminate/Database/Schema/Grammars/ChangeColumn.html