class DatabaseComparator
Service class for comparing Database objects Heavily inspired by Doctrine2's Migrations (see http://github.com/doctrine/dbal/tree/master/lib/Doctrine/DBAL/Schema/)
Methods
__construct($databaseDiff = null) | ||
getDatabaseDiff() | ||
setFromDatabase(Database $fromDatabase)
Sets the fromDatabase property. |
||
Database |
getFromDatabase()
Returns the fromDatabase property. |
|
setToDatabase(Database $toDatabase)
Sets the toDatabase property. |
||
Database |
getToDatabase()
Returns the toDatabase property. |
|
static DatabaseDiff|Boolean |
computeDiff(Database $fromDatabase, Database $toDatabase, boolean $caseInsensitive = false)
Returns the computed difference between two database objects. |
|
integer |
compareTables(boolean $caseInsensitive = false)
Returns the number of differences. |
Details
at line 26
public
__construct($databaseDiff = null)
at line 31
public
getDatabaseDiff()
at line 41
public
setFromDatabase(Database $fromDatabase)
Sets the fromDatabase property.
at line 51
public Database
getFromDatabase()
Returns the fromDatabase property.
at line 61
public
setToDatabase(Database $toDatabase)
Sets the toDatabase property.
at line 71
public Database
getToDatabase()
Returns the toDatabase property.
at line 84
static public DatabaseDiff|Boolean
computeDiff(Database $fromDatabase, Database $toDatabase, boolean $caseInsensitive = false)
Returns the computed difference between two database objects.
at line 105
public integer
compareTables(boolean $caseInsensitive = false)
Returns the number of differences.
Compares the tables of the fromDatabase and the toDatabase, and modifies
the inner databaseDiff if necessary.