ISchemaWrapper
in
This interface allows to get information about the database schema.
This is particularly helpful for database migration scripts.
This interface must not be implemented in your application but
instead can be obtained in your migration scripts with the
$schemaClosure
Closure.
Tags
Table of Contents
Methods
- createTable() : Table
- Creates a new table.
- dropTable() : Schema
- Drops a table from the schema.
- getDatabasePlatform() : AbstractPlatform
- Gets the DatabasePlatform for the database.
- getTable() : Table
- getTableNames() : array<string|int, mixed>
- Gets all table names, prefixed with table prefix
- getTableNamesWithoutPrefix() : array<string|int, mixed>
- Gets all table names
- getTables() : array<string|int, Table>
- Gets all tables of this schema.
- hasTable() : bool
- Does this schema have a table with the given name?
Methods
createTable()
Creates a new table.
public
createTable(string $tableName) : Table
Parameters
- $tableName : string
-
Prefix is automatically prepended
Tags
Return values
TabledropTable()
Drops a table from the schema.
public
dropTable(string $tableName) : Schema
Parameters
- $tableName : string
-
Prefix is automatically prepended
Tags
Return values
SchemagetDatabasePlatform()
Gets the DatabasePlatform for the database.
public
getDatabasePlatform() : AbstractPlatform
Tags
Return values
AbstractPlatformgetTable()
public
getTable(string $tableName) : Table
Parameters
- $tableName : string
Tags
Return values
TablegetTableNames()
Gets all table names, prefixed with table prefix
public
getTableNames() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getTableNamesWithoutPrefix()
Gets all table names
public
getTableNamesWithoutPrefix() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getTables()
Gets all tables of this schema.
public
getTables() : array<string|int, Table>
Tags
Return values
array<string|int, Table>hasTable()
Does this schema have a table with the given name?
public
hasTable(string $tableName) : bool
Parameters
- $tableName : string
-
Prefix is automatically prepended