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 bool | doesntNeedCharacterOptions(string $type) Determine if the given type does not need character / collation options. | |
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.
static protected TableDiff|bool getChangedDiff(Grammar $grammar, Blueprint $blueprint, AbstractSchemaManager $schema)
Get the Doctrine table difference for the given changes.
static protected Table getTableWithColumnChanges(Blueprint $blueprint, Table $table)
Get a copy of the given Doctrine table after making the column changes.
static protected Column getDoctrineColumn(Table $table, Fluent $fluent)
Get the Doctrine column instance for a column change.
static protected array getDoctrineColumnChangeOptions(Fluent $fluent)
Get the Doctrine column change options.
static protected Type getDoctrineColumnType(string $type)
Get the doctrine column type.
static protected int calculateDoctrineTextLength(string $type)
Calculate the proper column length to force the Doctrine text type.
static protected bool doesntNeedCharacterOptions(string $type)
Determine if the given type does not need character / collation options.
static protected string|null mapFluentOptionToDoctrine(string $attribute)
Get the matching Doctrine option for a given Fluent attribute name.
static protected mixed mapFluentValueToDoctrine(string $option, mixed $value)
Get the matching Doctrine value for a given Fluent attribute.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/7.x/Illuminate/Database/Schema/Grammars/ChangeColumn.html