TableDefinition
final class TableDefinition (View source)
Provides the table definition contract for the database subsystem.
Methods
Builds the requested database value while preserving its framework contract.
Updates the query or object state used by subsequent database operations.
Updates the query or object state used by subsequent database operations.
Updates the query or object state used by subsequent database operations.
Updates the query or object state used by subsequent database operations.
Updates the query or object state used by subsequent database operations.
Updates the query or object state used by subsequent database operations.
Updates the query or object state used by subsequent database operations.
Updates the query or object state used by subsequent database operations.
Updates the query or object state used by subsequent database operations.
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.
Reports whether the requested condition holds for the current database state.
Reports whether the requested condition holds for the current database state.
Details
__construct
__construct(string $name, array $columns = [], array $modifiedColumns = [], array $droppedColumns = [], array $indexes = [], array $droppedIndexes = [], array $foreignKeys = [], array $droppedForeignKeys = [], bool $ifNotExists = false, TableOptions|null $options = null)
No description
create
static TableDefinition
create(string $name)
Builds the requested database value while preserving its framework contract.
withIfNotExists
TableDefinition
withIfNotExists(bool $ifNotExists = true)
Updates the query or object state used by subsequent database operations.
withOptions
TableDefinition
withOptions(TableOptions|null $options)
Updates the query or object state used by subsequent database operations.
withColumn
TableDefinition
withColumn(ColumnDefinition $column)
Updates the query or object state used by subsequent database operations.
withModifiedColumn
TableDefinition
withModifiedColumn(ColumnDefinition $column)
Updates the query or object state used by subsequent database operations.
withoutColumn
TableDefinition
withoutColumn(string $column)
Updates the query or object state used by subsequent database operations.
withIndex
TableDefinition
withIndex(IndexDefinition $index)
Updates the query or object state used by subsequent database operations.
withoutIndex
TableDefinition
withoutIndex(string $index)
Updates the query or object state used by subsequent database operations.
withForeignKey
TableDefinition
withForeignKey(ForeignKeyDefinition $foreignKey)
Updates the query or object state used by subsequent database operations.
withoutForeignKey
TableDefinition
withoutForeignKey(string $foreignKey)
Updates the query or object state used by subsequent database operations.
name
string
name()
Provides this part of the database contract while preserving the object's current state and driver semantics.
columns
array
columns()
No description
modifiedColumns
array
modifiedColumns()
No description
droppedColumns
array
droppedColumns()
No description
indexes
array
indexes()
No description
droppedIndexes
array
droppedIndexes()
No description
foreignKeys
array
foreignKeys()
No description
droppedForeignKeys
array
droppedForeignKeys()
No description
ifNotExists
bool
ifNotExists()
Provides this part of the database contract while preserving the object's current state and driver semantics.
options
TableOptions|null
options()
Provides this part of the database contract while preserving the object's current state and driver semantics.
hasCreateDefinitions
bool
hasCreateDefinitions()
Reports whether the requested condition holds for the current database state.
hasAlterDefinitions
bool
hasAlterDefinitions()
Reports whether the requested condition holds for the current database state.