TableBlueprint
final class TableBlueprint (View source)
Collects declarative column, index, foreign-key, and table-option changes for one table.
Methods
Initializes this TableBlueprint with the collaborators and state required by its database contract.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Adds a binary column, optionally with a fixed length for hashes and opaque identifiers.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Converts the current database value into the representation required by its consumer.
Details
__construct
__construct(string $name)
Initializes this TableBlueprint with the collaborators and state required by its database contract.
id
ColumnBlueprint
id(string $name = 'id')
Provides this part of the database contract while preserving the object's current state and driver semantics.
uuid
ColumnBlueprint
uuid(string $name = 'uuid')
Provides this part of the database contract while preserving the object's current state and driver semantics.
char
ColumnBlueprint
char(string $name, int $length = 255)
Provides this part of the database contract while preserving the object's current state and driver semantics.
string
ColumnBlueprint
string(string $name, int $length = 255)
Provides this part of the database contract while preserving the object's current state and driver semantics.
text
ColumnBlueprint
text(string $name)
Provides this part of the database contract while preserving the object's current state and driver semantics.
mediumText
ColumnBlueprint
mediumText(string $name)
Provides this part of the database contract while preserving the object's current state and driver semantics.
longText
ColumnBlueprint
longText(string $name)
Provides this part of the database contract while preserving the object's current state and driver semantics.
integer
ColumnBlueprint
integer(string $name)
Provides this part of the database contract while preserving the object's current state and driver semantics.
unsignedInteger
ColumnBlueprint
unsignedInteger(string $name)
Provides this part of the database contract while preserving the object's current state and driver semantics.
tinyInteger
ColumnBlueprint
tinyInteger(string $name)
Provides this part of the database contract while preserving the object's current state and driver semantics.
smallInteger
ColumnBlueprint
smallInteger(string $name)
Provides this part of the database contract while preserving the object's current state and driver semantics.
mediumInteger
ColumnBlueprint
mediumInteger(string $name)
Provides this part of the database contract while preserving the object's current state and driver semantics.
bigInteger
ColumnBlueprint
bigInteger(string $name)
Provides this part of the database contract while preserving the object's current state and driver semantics.
unsignedBigInteger
ColumnBlueprint
unsignedBigInteger(string $name)
Provides this part of the database contract while preserving the object's current state and driver semantics.
boolean
ColumnBlueprint
boolean(string $name)
Provides this part of the database contract while preserving the object's current state and driver semantics.
decimal
ColumnBlueprint
decimal(string $name, int $precision = 10, int $scale = 2)
Provides this part of the database contract while preserving the object's current state and driver semantics.
float
ColumnBlueprint
float(string $name)
Provides this part of the database contract while preserving the object's current state and driver semantics.
double
ColumnBlueprint
double(string $name)
Provides this part of the database contract while preserving the object's current state and driver semantics.
date
ColumnBlueprint
date(string $name)
Provides this part of the database contract while preserving the object's current state and driver semantics.
datetime
ColumnBlueprint
datetime(string $name)
Provides this part of the database contract while preserving the object's current state and driver semantics.
timestamp
ColumnBlueprint
timestamp(string $name)
Provides this part of the database contract while preserving the object's current state and driver semantics.
time
ColumnBlueprint
time(string $name)
Provides this part of the database contract while preserving the object's current state and driver semantics.
json
ColumnBlueprint
json(string $name)
Provides this part of the database contract while preserving the object's current state and driver semantics.
binary
ColumnBlueprint
binary(string $name, int|null $length = null)
Adds a binary column, optionally with a fixed length for hashes and opaque identifiers.
timestamps
void
timestamps()
Provides this part of the database contract while preserving the object's current state and driver semantics.
softDeletes
ColumnBlueprint
softDeletes(string $column = 'deleted_at')
Provides this part of the database contract while preserving the object's current state and driver semantics.
raw
void
raw(string $definition)
Provides this part of the database contract while preserving the object's current state and driver semantics.
modify
ColumnBlueprint
modify(string $name, ColumnType|string $type, int|string|null $length = null)
Provides this part of the database contract while preserving the object's current state and driver semantics.
renameColumn
ColumnBlueprint
renameColumn(string $from, string $to)
Provides this part of the database contract while preserving the object's current state and driver semantics.
dropColumn
void
dropColumn(string $column)
Provides this part of the database contract while preserving the object's current state and driver semantics.
primary
void
primary(string|array $columns, string|null $name = null, bool $ifNotExists = false)
No description
index
void
index(string|array $columns, string|null $name = null, bool $ifNotExists = false)
No description
unique
void
unique(string|array $columns, string|null $name = null, bool $ifNotExists = false)
No description
fulltext
void
fulltext(string|array $columns, string|null $name = null, bool $ifNotExists = false)
No description
spatial
void
spatial(string|array $columns, string|null $name = null, bool $ifNotExists = false)
No description
dropIndex
void
dropIndex(string $name)
Provides this part of the database contract while preserving the object's current state and driver semantics.
dropPrimary
void
dropPrimary(string|null $name = null)
Provides this part of the database contract while preserving the object's current state and driver semantics.
dropForeign
void
dropForeign(string $name)
Provides this part of the database contract while preserving the object's current state and driver semantics.
options
void
options(TableOptions $options)
Provides this part of the database contract while preserving the object's current state and driver semantics.
engine
void
engine(string $engine)
Provides this part of the database contract while preserving the object's current state and driver semantics.
charset
void
charset(string $charset)
Provides this part of the database contract while preserving the object's current state and driver semantics.
collation
void
collation(string $collation)
Provides this part of the database contract while preserving the object's current state and driver semantics.
comment
void
comment(string $comment)
Provides this part of the database contract while preserving the object's current state and driver semantics.
toDefinition
TableDefinition
toDefinition()
Converts the current database value into the representation required by its consumer.