Methods |
public
|
__construct(Connection $connection): void
Create a new database Schema manager.
Create a new database Schema manager.
|
#
|
public
static
|
defaultStringLength(int $length): void
Set the default string length for migrations.
Set the default string length for migrations.
|
#
|
public
static
|
defaultMorphKeyType(string $type): void
Set the default morph key type for migrations.
Set the default morph key type for migrations.
Throws
|
#
|
public
static
|
morphUsingUuids(): void
Set the default morph key type for migrations to UUIDs.
Set the default morph key type for migrations to UUIDs.
|
#
|
public
|
createDatabase(string $name): bool
Create a database in the schema.
Create a database in the schema.
Throws
|
#
|
public
|
dropDatabaseIfExists(string $name): bool
Drop a database from the schema if the database exists.
Drop a database from the schema if the database exists.
Throws
|
#
|
public
|
hasTable(string $table): bool
Determine if the given table exists.
Determine if the given table exists.
|
#
|
public
|
hasColumn(string $table, string $column): bool
Determine if the given table has a given column.
Determine if the given table has a given column.
|
#
|
public
|
hasColumns(string $table, array $columns): bool
Determine if the given table has given columns.
Determine if the given table has given columns.
|
#
|
public
|
getColumnType(string $table, string $column): string
Get the data type for the given column name.
Get the data type for the given column name.
|
#
|
public
|
getColumnListing(string $table): array
Get the column listing for a given table.
Get the column listing for a given table.
|
#
|
public
|
table(string $table, Closure $callback): void
Modify a table on the schema.
Modify a table on the schema.
|
#
|
public
|
create(string $table, Closure $callback): void
Create a new table on the schema.
Create a new table on the schema.
|
#
|
public
|
drop(string $table): void
Drop a table from the schema.
Drop a table from the schema.
|
#
|
public
|
dropIfExists(string $table): void
Drop a table from the schema if it exists.
Drop a table from the schema if it exists.
|
#
|
public
|
dropColumns(string $table, string|array $columns): void
Drop columns from a table schema.
Drop columns from a table schema.
|
#
|
public
|
dropAllTables(): void
Drop all tables from the database.
Drop all tables from the database.
Throws
|
#
|
public
|
dropAllViews(): void
Drop all views from the database.
Drop all views from the database.
Throws
|
#
|
public
|
dropAllTypes(): void
Drop all types from the database.
Drop all types from the database.
Throws
|
#
|
public
|
getAllTables(): void
Get all of the table names for the database.
Get all of the table names for the database.
Throws
|
#
|
public
|
rename(string $from, string $to): void
Rename a table on the schema.
Rename a table on the schema.
|
#
|
public
|
enableForeignKeyConstraints(): bool
Enable foreign key constraints.
Enable foreign key constraints.
|
#
|
public
|
disableForeignKeyConstraints(): bool
Disable foreign key constraints.
Disable foreign key constraints.
|
#
|
public
|
registerCustomDoctrineType(string $class, string $name, string $type): void
Register a custom Doctrine mapping type.
Register a custom Doctrine mapping type.
|
#
|
public
|
getConnection(): Connection
Get the database connection instance.
Get the database connection instance.
|
#
|
public
|
setConnection(Connection $connection): $this
Set the database connection instance.
Set the database connection instance.
|
#
|
public
|
blueprintResolver(Closure $resolver): void
Set the Schema Blueprint resolver callback.
Set the Schema Blueprint resolver callback.
|
#
|