Propel API
Class

PropelDatabaseComparator

class PropelDatabaseComparator

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)

Setter for the fromDatabase property

Database getFromDatabase()

Getter for the fromDatabase property

setToDatabase(Database $toDatabase)

Setter for the toDatabase property

Database getToDatabase()

Getter for the toDatabase property

static PropelDatabaseDiff|boolean computeDiff(Database $fromDatabase, Database $toDatabase, boolean $caseInsensitive = false)

Compute and return the difference between two database objects

integer compareTables(boolean $caseInsensitive = false)

Compare the tables of the fromDatabase and the toDatabase, and modifies the inner databaseDiff if necessary.

Details

at line 28
public __construct($databaseDiff = null)

Parameters

$databaseDiff

at line 33
public getDatabaseDiff()

at line 43
public setFromDatabase(Database $fromDatabase)

Setter for the fromDatabase property

Parameters

Database $fromDatabase

at line 53
public Database getFromDatabase()

Getter for the fromDatabase property

Return Value

Database

at line 63
public setToDatabase(Database $toDatabase)

Setter for the toDatabase property

Parameters

Database $toDatabase

at line 73
public Database getToDatabase()

Getter for the toDatabase property

Return Value

Database

at line 88
static public PropelDatabaseDiff|boolean computeDiff(Database $fromDatabase, Database $toDatabase, boolean $caseInsensitive = false)

Compute and return the difference between two database objects

Parameters

Database $fromDatabase
Database $toDatabase
boolean $caseInsensitive Whether the comparison is case insensitive. False by default.

Return Value

PropelDatabaseDiff|boolean return false if the two databases are similar

at line 109
public integer compareTables(boolean $caseInsensitive = false)

Compare the tables of the fromDatabase and the toDatabase, and modifies the inner databaseDiff if necessary.

Returns the number of differences.

Parameters

boolean $caseInsensitive Whether the comparison is case insensitive. False by default.

Return Value

integer The number of table differences