Class:Schema - Superclass: AbstractAsset AbstractAsset
⌊ Schema
public class Schema
extends AbstractAsset
www.doctrine-project.org
Field Summary | |
---|---|
protected SchemaConfig | |
protected array | |
protected array |
Fields inherited from Doctrine\DBAL\Schema\AbstractAsset | |
---|---|
_name |
Constructor Summary | |
---|---|
Schema(array tables, SchemaConfig schemaConfig, array sequences, array views, array triggers) |
Method Summary | |
---|---|
Sequence | createSequence(string sequenceName, int allocationSize, int initialValue) Create a new sequence |
Table | createTable(string tableName) Create a new table |
Schema | dropSequence(string sequenceName) |
Schema | dropTable(string tableName) Drop a table from the schema. |
void | getMigrateFromSql(Schema fromSchema, AbstractPlatform platform) |
void | getMigrateToSql(Schema toSchema, AbstractPlatform platform) |
Doctrine\DBAL\Schema\Sequence | getSequence(string sequenceName) |
Doctrine\DBAL\Schema\Sequence[] | |
Table | getTable(string tableName) |
array | Get all tables of this schema. |
bool | |
bool | hasSequence(string sequenceName) |
Schema | hasTable(string tableName) Does this schema have a table with the given name? |
Schema | renameTable(string oldTableName, string newTableName) Rename a table |
array | toDropSql(AbstractPlatform platform) Return an array of necessary sql queries to drop the schema on the given platform. |
array | toSql(AbstractPlatform platform) Return an array of necessary sql queries to create the schema on the given platform. |
void |
Methods inherited from Doctrine\DBAL\Schema\AbstractAsset | |
---|---|
getName |
protected SchemaConfig $_schemaConfig = false
protected array $_sequences = array()
protected array $_tables = array()
public Schema(array tables, SchemaConfig schemaConfig, array sequences, array views, array triggers)
public Sequence createSequence(string sequenceName, int allocationSize, int initialValue)
Create a new sequence
public Table createTable(string tableName)
Create a new table
public Schema dropSequence(string sequenceName)
public Schema dropTable(string tableName)
Drop a table from the schema.
public void getMigrateFromSql(Schema fromSchema, AbstractPlatform platform)
public void getMigrateToSql(Schema toSchema, AbstractPlatform platform)
public Doctrine\DBAL\Schema\Sequence getSequence(string sequenceName)
public Doctrine\DBAL\Schema\Sequence[] getSequences()
public Table getTable(string tableName)
public array getTables()
Get all tables of this schema.
public bool hasExplicitForeignKeyIndexes()
public bool hasSequence(string sequenceName)
public Schema hasTable(string tableName)
Does this schema have a table with the given name?
public Schema renameTable(string oldTableName, string newTableName)
Rename a table
public array toDropSql(AbstractPlatform platform)
Return an array of necessary sql queries to drop the schema on the given platform.
public array toSql(AbstractPlatform platform)
Return an array of necessary sql queries to create the schema on the given platform.
public void visit(Visitor visitor)
Object representation of a database schema