Documentation

SchemaDiff
in package

Schema Diff.

Tags
link
www.doctrine-project.org
copyright

Copyright (C) 2005-2009 eZ Systems AS. All rights reserved.

license

http://ez.no/licenses/new_bsd New BSD License

since
2.0
author

Benjamin Eberlei kontakt@beberlei.de

Table of Contents

$changedSequences  : array<string|int, Sequence>
$changedTables  : array<string|int, TableDiff>
All changed tables.
$fromSchema  : Schema
$newNamespaces  : array<string|int, string>
All added namespaces.
$newSequences  : array<string|int, Sequence>
$newTables  : array<string|int, Table>
All added tables.
$orphanedForeignKeys  : array<string|int, ForeignKeyConstraint>
$removedNamespaces  : array<string|int, string>
All removed namespaces.
$removedSequences  : array<string|int, Sequence>
$removedTables  : array<string|int, Table>
All removed tables.
__construct()  : mixed
Constructs an SchemaDiff object.
toSaveSql()  : array<string|int, mixed>
The to save sql mode ensures that the following things don't happen:
toSql()  : array<string|int, mixed>
_toSql()  : array<string|int, mixed>

Properties

$changedTables

All changed tables.

public array<string|int, TableDiff> $changedTables = array()

$newNamespaces

All added namespaces.

public array<string|int, string> $newNamespaces = array()

$newTables

All added tables.

public array<string|int, Table> $newTables = array()

$removedNamespaces

All removed namespaces.

public array<string|int, string> $removedNamespaces = array()

$removedTables

All removed tables.

public array<string|int, Table> $removedTables = array()

Methods

__construct()

Constructs an SchemaDiff object.

public __construct([array<string|int, Table$newTables = array() ][, array<string|int, TableDiff$changedTables = array() ][, array<string|int, Table$removedTables = array() ][, Schema|null $fromSchema = null ]) : mixed
Parameters
$newTables : array<string|int, Table> = array()
$changedTables : array<string|int, TableDiff> = array()
$removedTables : array<string|int, Table> = array()
$fromSchema : Schema|null = null
Return values
mixed

toSaveSql()

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

public toSaveSql(AbstractPlatform $platform) : array<string|int, mixed>
  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
Return values
array<string|int, mixed>

_toSql()

protected _toSql(AbstractPlatform $platform[, bool $saveMode = false ]) : array<string|int, mixed>
Parameters
$platform : AbstractPlatform
$saveMode : bool = false
Return values
array<string|int, mixed>

Search results