class PropelTableComparator
Service class for comparing Table objects Heavily inspired by Doctrine2's Migrations (see http://github.com/doctrine/dbal/tree/master/lib/Doctrine/DBAL/Schema/)
Methods
__construct($tableDiff = null) | ||
getTableDiff() | ||
setFromTable(Table $fromTable)
Set the table the comparator starts from |
||
Table |
getFromTable()
Get the table the comparator starts from |
|
setToTable(Table $toTable)
Set the table the comparator goes to |
||
Table |
getToTable()
Get the table the comparator goes to |
|
static PropelTableDiff|boolean |
computeDiff(Table $fromTable, Table $toTable, boolean $caseInsensitive = false)
Compute and return the difference between two table objects |
|
integer |
compareColumns(boolean $caseInsensitive = false)
Compare the columns of the fromTable and the toTable, and modifies the inner tableDiff if necessary. |
|
integer |
comparePrimaryKeys(boolean $caseInsensitive = false)
Compare the primary keys of the fromTable and the toTable, and modifies the inner tableDiff if necessary. |
|
integer |
compareIndices(boolean $caseInsensitive = false)
Compare the indices and unique indices of the fromTable and the toTable, and modifies the inner tableDiff if necessary. |
|
integer |
compareForeignKeys(boolean $caseInsensitive = false)
Compare the foreign keys of the fromTable and the toTable, and modifies the inner tableDiff if necessary. |
Details
at line 29
public
__construct($tableDiff = null)
at line 34
public
getTableDiff()
at line 44
public
setFromTable(Table $fromTable)
Set the table the comparator starts from
at line 54
public Table
getFromTable()
Get the table the comparator starts from
at line 64
public
setToTable(Table $toTable)
Set the table the comparator goes to
at line 74
public Table
getToTable()
Get the table the comparator goes to
at line 89
static public PropelTableDiff|boolean
computeDiff(Table $fromTable, Table $toTable, boolean $caseInsensitive = false)
Compute and return the difference between two table objects
at line 113
public integer
compareColumns(boolean $caseInsensitive = false)
Compare the columns of the fromTable and the toTable, and modifies the inner tableDiff if necessary.
Returns the number of differences.
at line 173
public integer
comparePrimaryKeys(boolean $caseInsensitive = false)
Compare the primary keys of the fromTable and the toTable, and modifies the inner tableDiff if necessary.
Returns the number of differences.
at line 223
public integer
compareIndices(boolean $caseInsensitive = false)
Compare the indices and unique indices of the fromTable and the toTable, and modifies the inner tableDiff if necessary.
Returns the number of differences.
at line 272
public integer
compareForeignKeys(boolean $caseInsensitive = false)
Compare the foreign keys of the fromTable and the toTable, and modifies the inner tableDiff if necessary.
Returns the number of differences.