Documentation

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

Methods

getCreatedSchemas()

public getCreatedSchemas() : array<string|int, string>
Return values
array<string|int, string>

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>

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
bool

toSaveSql()

The to save sql mode ensures that the following things don't happen:

public toSaveSql(AbstractPlatform $platform) : array<int, string>
  1. Tables are deleted
  2. Sequences are deleted
  3. 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
deprecated
Return values
array<int, string>

        
On this page

Search results