class TableDiff
Value object for storing Table object diffs Heavily inspired by Doctrine2's Migrations (see http://github.com/doctrine/dbal/tree/master/lib/Doctrine/DBAL/Schema/)
Methods
setFromTable(Table $fromTable)
Sets the fromTable property. |
||
Table |
getFromTable()
Returns the fromTable property. |
|
setToTable(Table $toTable)
Sets the toTable property. |
||
Table |
getToTable()
Returns the toTable property. |
|
setAddedColumns(array $columns)
Sets the added columns. |
||
addAddedColumn(string $name, Column $column)
Adds an added column. |
||
removeAddedColumn(string $name)
Removes an added column. |
||
array |
getAddedColumns()
Returns the list of added columns |
|
getAddedColumn($name)
Returns an added column. |
||
setRemovedColumns(array $removedColumns)
Setter for the removedColumns property |
||
addRemovedColumn(string $columnName, Column $removedColumn)
Add a removed column |
||
removeRemovedColumn(string $columnName)
Remove a removed column |
||
array |
getRemovedColumns()
Getter for the removedColumns property |
|
getRemovedColumn($columnName)
Get a removed column |
||
setModifiedColumns(array $modifiedColumns)
Setter for the modifiedColumns property |
||
addModifiedColumn(string $columnName, ColumnDiff $modifiedColumn)
Add a column difference |
||
array |
getModifiedColumns()
Getter for the modifiedColumns property |
|
setRenamedColumns(array $renamedColumns)
Setter for the renamedColumns property |
||
addRenamedColumn(Column $fromColumn, Column $toColumn)
Add a renamed column |
||
array |
getRenamedColumns()
Getter for the renamedColumns property |
|
setAddedPkColumns($addedPkColumns $addedPkColumns)
Setter for the addedPkColumns property |
||
addAddedPkColumn(string $columnName, Column $addedPkColumn)
Add an added Pk column |
||
removeAddedPkColumn(string $columnName)
Remove an added Pk column |
||
array |
getAddedPkColumns()
Getter for the addedPkColumns property |
|
setRemovedPkColumns($removedPkColumns $removedPkColumns)
Setter for the removedPkColumns property |
||
addRemovedPkColumn($columnName, Column $removedPkColumn)
Add a removed Pk column |
||
removeRemovedPkColumn(string $columnName)
Remove a removed Pk column |
||
array |
getRemovedPkColumns()
Getter for the removedPkColumns property |
|
setRenamedPkColumns($renamedPkColumns $renamedPkColumns)
Setter for the renamedPkColumns property |
||
addRenamedPkColumn(Column $fromColumn, Column $toColumn)
Add a renamed Pk column |
||
array |
getRenamedPkColumns()
Getter for the renamedPkColumns property |
|
boolean |
hasModifiedPk()
Whether the primary key was modified |
|
setAddedIndices($addedIndices $addedIndices)
Setter for the addedIndices property |
||
addAddedIndex(string $indexName, Index $addedIndex)
Add an added Index |
||
array |
getAddedIndices()
Getter for the addedIndices property |
|
setRemovedIndices($removedIndices $removedIndices)
Setter for the removedIndices property |
||
addRemovedIndex(string $indexName, Index $removedIndex)
Add a removed Index |
||
array |
getRemovedIndices()
Getter for the removedIndices property |
|
setModifiedIndices($modifiedIndices $modifiedIndices)
Setter for the modifiedIndices property |
||
addModifiedIndex(string $indexName, Index $fromIndex, Index $toIndex)
Add a modified Index |
||
getModifiedIndices()
Getter for the modifiedIndices property |
||
setAddedFks($addedFks $addedFks)
Setter for the addedFks property |
||
addAddedFk(string $fkName, ForeignKey $addedFk)
Add an added Fk column |
||
removeAddedFk(string $fkName)
Remove an added Fk column |
||
array |
getAddedFks()
Getter for the addedFks property |
|
setRemovedFks($removedFks $removedFks)
Setter for the removedFks property |
||
addRemovedFk($fkName, ForeignKey $removedFk)
Add a removed Fk column |
||
removeRemovedFk(string $fkName)
Remove a removed Fk column |
||
array |
getRemovedFks()
Getter for the removedFks property |
|
setModifiedFks(array $modifiedFks)
Setter for the modifiedFks property |
||
addModifiedFk(string $fkName, ForeignKey $fromFk, ForeignKey $toFk)
Add a modified Fk |
||
array |
getModifiedFks()
Getter for the modifiedFks property |
|
TableDiff |
getReverseDiff()
Get the reverse diff for this diff |
|
__toString() |
Details
at line 50
public
setFromTable(Table $fromTable)
Sets the fromTable property.
at line 60
public Table
getFromTable()
Returns the fromTable property.
at line 70
public
setToTable(Table $toTable)
Sets the toTable property.
at line 80
public Table
getToTable()
Returns the toTable property.
at line 90
public
setAddedColumns(array $columns)
Sets the added columns.
at line 101
public
addAddedColumn(string $name, Column $column)
Adds an added column.
at line 111
public
removeAddedColumn(string $name)
Removes an added column.
at line 121
public array
getAddedColumns()
Returns the list of added columns
at line 132
public
getAddedColumn($name)
Returns an added column.
at line 142
public
setRemovedColumns(array $removedColumns)
Setter for the removedColumns property
at line 153
public
addRemovedColumn(string $columnName, Column $removedColumn)
Add a removed column
at line 163
public
removeRemovedColumn(string $columnName)
Remove a removed column
at line 173
public array
getRemovedColumns()
Getter for the removedColumns property
at line 185
public
getRemovedColumn($columnName)
Get a removed column
at line 195
public
setModifiedColumns(array $modifiedColumns)
Setter for the modifiedColumns property
at line 206
public
addModifiedColumn(string $columnName, ColumnDiff $modifiedColumn)
Add a column difference
at line 216
public array
getModifiedColumns()
Getter for the modifiedColumns property
at line 226
public
setRenamedColumns(array $renamedColumns)
Setter for the renamedColumns property
at line 237
public
addRenamedColumn(Column $fromColumn, Column $toColumn)
Add a renamed column
at line 247
public array
getRenamedColumns()
Getter for the renamedColumns property
at line 257
public
setAddedPkColumns($addedPkColumns $addedPkColumns)
Setter for the addedPkColumns property
at line 268
public
addAddedPkColumn(string $columnName, Column $addedPkColumn)
Add an added Pk column
at line 278
public
removeAddedPkColumn(string $columnName)
Remove an added Pk column
at line 288
public array
getAddedPkColumns()
Getter for the addedPkColumns property
at line 298
public
setRemovedPkColumns($removedPkColumns $removedPkColumns)
Setter for the removedPkColumns property
at line 309
public
addRemovedPkColumn($columnName, Column $removedPkColumn)
Add a removed Pk column
at line 319
public
removeRemovedPkColumn(string $columnName)
Remove a removed Pk column
at line 329
public array
getRemovedPkColumns()
Getter for the removedPkColumns property
at line 339
public
setRenamedPkColumns($renamedPkColumns $renamedPkColumns)
Setter for the renamedPkColumns property
at line 350
public
addRenamedPkColumn(Column $fromColumn, Column $toColumn)
Add a renamed Pk column
at line 360
public array
getRenamedPkColumns()
Getter for the renamedPkColumns property
at line 370
public boolean
hasModifiedPk()
Whether the primary key was modified
at line 380
public
setAddedIndices($addedIndices $addedIndices)
Setter for the addedIndices property
at line 391
public
addAddedIndex(string $indexName, Index $addedIndex)
Add an added Index
at line 401
public array
getAddedIndices()
Getter for the addedIndices property
at line 411
public
setRemovedIndices($removedIndices $removedIndices)
Setter for the removedIndices property
at line 422
public
addRemovedIndex(string $indexName, Index $removedIndex)
Add a removed Index
at line 432
public array
getRemovedIndices()
Getter for the removedIndices property
at line 442
public
setModifiedIndices($modifiedIndices $modifiedIndices)
Setter for the modifiedIndices property
at line 454
public
addModifiedIndex(string $indexName, Index $fromIndex, Index $toIndex)
Add a modified Index
at line 464
public
getModifiedIndices()
Getter for the modifiedIndices property
at line 474
public
setAddedFks($addedFks $addedFks)
Setter for the addedFks property
at line 485
public
addAddedFk(string $fkName, ForeignKey $addedFk)
Add an added Fk column
at line 495
public
removeAddedFk(string $fkName)
Remove an added Fk column
at line 505
public array
getAddedFks()
Getter for the addedFks property
at line 515
public
setRemovedFks($removedFks $removedFks)
Setter for the removedFks property
at line 526
public
addRemovedFk($fkName, ForeignKey $removedFk)
Add a removed Fk column
at line 536
public
removeRemovedFk(string $fkName)
Remove a removed Fk column
at line 546
public array
getRemovedFks()
Getter for the removedFks property
at line 556
public
setModifiedFks(array $modifiedFks)
Setter for the modifiedFks property
at line 568
public
addModifiedFk(string $fkName, ForeignKey $fromFk, ForeignKey $toFk)
Add a modified Fk
at line 578
public array
getModifiedFks()
Getter for the modifiedFks property
at line 588
public TableDiff
getReverseDiff()
Get the reverse diff for this diff