SchemaDiff
class \
- Extends
- SchemaDiff
Based on the doctrine/dbal implementation restoring direct property access and adding further helper methods.
Internal
not part of public Core API.
Table of Contents
Properties
- $alteredSequences : array
- $alteredTables : array
- $createdSchemas : array
- $createdSequences : array
- $createdTables : array
- $droppedSchemas : array
- $droppedSequences : array
- $droppedTables : array
Methods
- __construct() : mixed
- Constructs an SchemaDiff object.
- ensure() : self
- ensureCollection() : TableDiff[]|Table[]
- getAlteredSequences() : Sequence[]
- getAlteredTables() : array<string, TableDiff>
- getCreatedSchemas() : string[]
- getCreatedSequences() : Sequence[]
- getCreatedTables() : array<string, Table>
- getDroppedSchemas() : string[]
- getDroppedSequences() : Sequence[]
- getDroppedTables() : array<string, Table>
- isEmpty() : bool
- Returns whether the diff is empty (contains no changes).
Properties
$alteredSequences
public
array
$alteredSequences
$alteredTables
public
array
$alteredTables
$createdSchemas
public
array
$createdSchemas
$createdSequences
public
array
$createdSequences
$createdTables
public
array
$createdTables
$droppedSchemas
public
array
$droppedSchemas
$droppedSequences
public
array
$droppedSequences
$droppedTables
public
array
$droppedTables
Methods
__construct()
Constructs an SchemaDiff object.
public
__construct(string[] $createdSchemas, string[] $droppedSchemas, array<string, Table> $createdTables, array<string, TableDiff> $alteredTables, array<string, Table> $droppedTables, Sequence[] $createdSequences, Sequence[] $alteredSequences, Sequence[] $droppedSequences) : mixed
Parameters
- $createdSchemas : string[]
- $droppedSchemas : string[]
- $createdTables : array<string, Table>
- $alteredTables : array<string, TableDiff>
- $droppedTables : array<string, Table>
- $createdSequences : Sequence[]
- $alteredSequences : Sequence[]
- $droppedSequences : Sequence[]
Internal
The diff can be only instantiated by a Comparator.
ensure()
public
static ensure(SchemaDiff|SchemaDiff $schemaDiff[, array $additionalArguments = [] ]) : self
Parameters
- $schemaDiff : SchemaDiff|SchemaDiff
- $additionalArguments : array = []
Return values
selfensureCollection()
public
static ensureCollection(TableDiff|TableDiff|Table ...$tableDiffs) : TableDiff[]|Table[]
Parameters
- $tableDiffs : TableDiff|TableDiff|Table
Return values
TableDiff[]|Table[]getAlteredSequences()
public
getAlteredSequences() : Sequence[]
Return values
Sequence[]getAlteredTables()
public
getAlteredTables() : array<string, TableDiff>
Return values
array<string, TableDiff>getCreatedSchemas()
public
getCreatedSchemas() : string[]
Return values
string[]getCreatedSequences()
public
getCreatedSequences() : Sequence[]
Return values
Sequence[]getCreatedTables()
public
getCreatedTables() : array<string, Table>
Return values
array<string, Table>getDroppedSchemas()
public
getDroppedSchemas() : string[]
Return values
string[]getDroppedSequences()
public
getDroppedSequences() : Sequence[]
Return values
Sequence[]getDroppedTables()
public
getDroppedTables() : array<string, Table>
Return values
array<string, Table>isEmpty()
Returns whether the diff is empty (contains no changes).
public
isEmpty() : bool