class SchemaDiff (View source)

Schema Diff

Properties

array(string=>ezcDbSchemaTable) $newTables All added tables
array(string=>ezcDbSchemaTableDiff) $changedTables All changed tables
array(string=>Table) $removedTables All removed tables
array $newSequences
array $changedSequences
array $removedSequences
array $orphanedForeignKeys

Methods

__construct(array(string=>Table) $newTables = array(), array(string=>TableDiff) $changedTables = array(), array(string=>bool) $removedTables = array())

Constructs an SchemaDiff object.

array
toSaveSql(AbstractPlatform $platform)

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

array
toSql(AbstractPlatform $platform)

No description

array
_toSql(AbstractPlatform $platform, bool $saveMode = false)

No description

Details

__construct(array(string=>Table) $newTables = array(), array(string=>TableDiff) $changedTables = array(), array(string=>bool) $removedTables = array())

Constructs an SchemaDiff object.

Parameters

array(string=>Table) $newTables
array(string=>TableDiff) $changedTables
array(string=>bool) $removedTables

array toSaveSql(AbstractPlatform $platform)

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

  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

AbstractPlatform $platform

Return Value

array

array toSql(AbstractPlatform $platform)

Parameters

AbstractPlatform $platform

Return Value

array

protected array _toSql(AbstractPlatform $platform, bool $saveMode = false)

Parameters

AbstractPlatform $platform
bool $saveMode

Return Value

array