Propel 2 API
Class

Propel\Generator\Model\Diff\DatabaseDiff

class DatabaseDiff

Value object for storing Database object diffs Heavily inspired by Doctrine2's Migrations (see http://github.com/doctrine/dbal/tree/master/lib/Doctrine/DBAL/Schema/)

Methods

__construct()

setAddedTables(array $tables)

Sets the added tables.

addAddedTable(string $name, Table $table)

Adds an added table.

removeAddedTable(string $name)

Removes an added table.

array getAddedTables()

Returns the list of added tables.

integer countAddedTables()

Returns the number of added tables.

getAddedTable($name)

Returns an added table by its name.

setRemovedTables(array $tables)

Sets the removes tables.

addRemovedTable(string $name, Table $table)

Adds a table to remove.

removeRemovedTable(string $name)

Removes a removed table.

array getRemovedTables()

Returns the list of removed tables.

integer countRemovedTables()

Returns the number of removed tables.

getRemovedTable($name)

Returns a removed table.

setModifiedTables(array $tables)

Sets the modified tables

addModifiedTable(string $name, TableDiff $difference)

Adds a table difference.

integer countModifiedTables()

Returns the number of modified tables.

array getModifiedTables()

Returns the modified tables.

setRenamedTables(array $tables)

Sets the renamed tables.

addRenamedTable(string $fromName, string $toName)

Adds a renamed table.

array getRenamedTables()

Returns the list of renamed tables.

integer countRenamedTables()

Returns the number of renamed tables.

DatabaseDiff getReverseDiff()

Returns the reverse diff for this diff.

string getDescription()

Returns a description of the database modifications.

__toString()

Details

at line 28
public __construct()

at line 41
public setAddedTables(array $tables)

Sets the added tables.

Parameters

array $tables

at line 52
public addAddedTable(string $name, Table $table)

Adds an added table.

Parameters

string $name
Table $table

at line 62
public removeAddedTable(string $name)

Removes an added table.

Parameters

string $name

at line 72
public array getAddedTables()

Returns the list of added tables.

Return Value

array

at line 82
public integer countAddedTables()

Returns the number of added tables.

Return Value

integer

at line 93
public getAddedTable($name)

Returns an added table by its name.

Parameters

$name

at line 103
public setRemovedTables(array $tables)

Sets the removes tables.

Parameters

array $tables

at line 114
public addRemovedTable(string $name, Table $table)

Adds a table to remove.

Parameters

string $name
Table $table

at line 124
public removeRemovedTable(string $name)

Removes a removed table.

Parameters

string $name

at line 134
public array getRemovedTables()

Returns the list of removed tables.

Return Value

array

at line 144
public integer countRemovedTables()

Returns the number of removed tables.

Return Value

integer

at line 155
public getRemovedTable($name)

Returns a removed table.

Parameters

$name

at line 165
public setModifiedTables(array $tables)

Sets the modified tables

Parameters

array $tables

at line 176
public addModifiedTable(string $name, TableDiff $difference)

Adds a table difference.

Parameters

string $name
TableDiff $difference

at line 186
public integer countModifiedTables()

Returns the number of modified tables.

Return Value

integer

at line 196
public array getModifiedTables()

Returns the modified tables.

Return Value

array

at line 206
public setRenamedTables(array $tables)

Sets the renamed tables.

Parameters

array $tables

at line 217
public addRenamedTable(string $fromName, string $toName)

Adds a renamed table.

Parameters

string $fromName
string $toName

at line 227
public array getRenamedTables()

Returns the list of renamed tables.

Return Value

array

at line 237
public integer countRenamedTables()

Returns the number of renamed tables.

Return Value

integer

at line 247
public DatabaseDiff getReverseDiff()

Returns the reverse diff for this diff.

Return Value

DatabaseDiff

at line 274
public string getDescription()

Returns a description of the database modifications.

Return Value

string

at line 293
public __toString()