SchemaDiff
in package
Differences between two schemas.
The object contains the operations to change the schema stored in $fromSchema to a target schema.
Table of Contents
Properties
- $fromSchema : Schema|null
- $orphanedForeignKeys : array<string|int, ForeignKeyConstraint>
Methods
- getAlteredSequences() : array<string|int, Sequence>
- getAlteredTables() : array<string|int, TableDiff>
- getCreatedSchemas() : array<string|int, string>
- getCreatedSequences() : array<string|int, Sequence>
- getCreatedTables() : array<string|int, Table>
- getDroppedSchemas() : array<string|int, string>
- getDroppedSequences() : array<string|int, Sequence>
- getDroppedTables() : array<string|int, Table>
- isEmpty() : bool
- Returns whether the diff is empty (contains no changes).
- toSaveSql() : array<int, string>
- The to save sql mode ensures that the following things don't happen:
- toSql() : array<int, string>
- _toSql() : array<int, string>
Properties
$fromSchema
public
Schema|null
$fromSchema
Tags
$orphanedForeignKeys
public
array<string|int, ForeignKeyConstraint>
$orphanedForeignKeys
= []
Tags
Methods
getAlteredSequences()
public
getAlteredSequences() : array<string|int, Sequence>
Return values
array<string|int, Sequence>getAlteredTables()
public
getAlteredTables() : array<string|int, TableDiff>
Return values
array<string|int, TableDiff>getCreatedSchemas()
public
getCreatedSchemas() : array<string|int, string>
Return values
array<string|int, string>getCreatedSequences()
public
getCreatedSequences() : array<string|int, Sequence>
Return values
array<string|int, Sequence>getCreatedTables()
public
getCreatedTables() : array<string|int, Table>
Return values
array<string|int, Table>getDroppedSchemas()
public
getDroppedSchemas() : array<string|int, string>
Return values
array<string|int, string>getDroppedSequences()
public
getDroppedSequences() : array<string|int, Sequence>
Return values
array<string|int, Sequence>getDroppedTables()
public
getDroppedTables() : array<string|int, Table>
Return values
array<string|int, Table>isEmpty()
Returns whether the diff is empty (contains no changes).
public
isEmpty() : bool
Return values
booltoSaveSql()
The to save sql mode ensures that the following things don't happen:
public
toSaveSql(AbstractPlatform $platform) : array<int, string>
- Tables are deleted
- Sequences are deleted
- Foreign Keys which reference tables that would otherwise be deleted.
This way it is ensured that assets are deleted which might not be relevant to the metadata schema at all.
Parameters
- $platform : AbstractPlatform
Tags
Return values
array<int, string>toSql()
public
toSql(AbstractPlatform $platform) : array<int, string>
Parameters
- $platform : AbstractPlatform
Tags
Return values
array<int, string>_toSql()
protected
_toSql(AbstractPlatform $platform[, bool $saveMode = false ]) : array<int, string>
Parameters
- $platform : AbstractPlatform
- $saveMode : bool = false