Propel 2 API
Class

Propel\Generator\Manager\MigrationManager

class MigrationManager extends AbstractManager

Service class for preparing and executing migrations

Methods

array getSchemas()

Returns the list of schemas.

from AbstractManager
setSchemas(array $schemas)

Sets the schemas list.

from AbstractManager
setWorkingDirectory(string $workingDirectory)

Sets the working directory path.

from AbstractManager
string getWorkingDirectory()

Returns the working directory path.

from AbstractManager
array getDataModels()

Returns the data models that have been processed.

from AbstractManager
array getDataModelDbMap()

Returns the data model to database name map.

from AbstractManager
setValidate(boolean $validate)

Sets whether to perform validation on the datamodel schema.xml file(s).

from AbstractManager
setXsd(string $xsd)

Sets the XSD schema to use for validation of any datamodel schema.xml file(s).

from AbstractManager
setXsl(string $xsl)

Sets the normalization XSLT to use to transform datamodel schema.xml file(s) before validation and parsing.

from AbstractManager
setDbEncoding(string $encoding)

Sets the current target database encoding.

from AbstractManager
setLoggerClosure(Closure $logger)

Sets a logger closure.

from AbstractManager
setGeneratorConfig(GeneratorConfigInterface $generatorConfig)

Sets the GeneratorConfigInterface implementation.

from AbstractManager
setConnections(array $connections)

Set the database connection settings

array getConnections()

Get the database connection settings

getConnection($datasource)

getAdapterConnection($datasource)

getPlatform($datasource)

setMigrationTable(string $migrationTable)

Set the migration table name

string getMigrationTable()

get the migration table name

getOldestDatabaseVersion()

migrationTableExists($datasource)

createMigrationTable($datasource)

updateLatestMigrationTimestamp($datasource, $timestamp)

getMigrationTimestamps()

getValidMigrationTimestamps()

hasPendingMigrations()

getAlreadyExecutedMigrationTimestamps()

getFirstUpMigrationTimestamp()

getFirstDownMigrationTimestamp()

static  getMigrationClassName($timestamp)

getMigrationObject($timestamp)

getMigrationClassBody($migrationsUp, $migrationsDown, $timestamp)

static  getMigrationFileName($timestamp)

static  getUser()

Details

in AbstractManager at line 100
public array getSchemas()

Returns the list of schemas.

Return Value

array

in AbstractManager at line 110
public setSchemas(array $schemas)

Sets the schemas list.

Parameters

array $schemas

in AbstractManager at line 120
public setWorkingDirectory(string $workingDirectory)

Sets the working directory path.

Parameters

string $workingDirectory

in AbstractManager at line 130
public string getWorkingDirectory()

Returns the working directory path.

Return Value

string

in AbstractManager at line 142
public array getDataModels()

Returns the data models that have been processed.

Return Value

array

in AbstractManager at line 156
public array getDataModelDbMap()

Returns the data model to database name map.

Return Value

array

in AbstractManager at line 170
public setValidate(boolean $validate)

Sets whether to perform validation on the datamodel schema.xml file(s).

Parameters

boolean $validate

in AbstractManager at line 181
public setXsd(string $xsd)

Sets the XSD schema to use for validation of any datamodel schema.xml file(s).

Parameters

string $xsd

in AbstractManager at line 192
public setXsl(string $xsl)

Sets the normalization XSLT to use to transform datamodel schema.xml file(s) before validation and parsing.

Parameters

string $xsl

in AbstractManager at line 202
public setDbEncoding(string $encoding)

Sets the current target database encoding.

Parameters

string $encoding Target database encoding

in AbstractManager at line 212
public setLoggerClosure(Closure $logger)

Sets a logger closure.

Parameters

Closure $logger

in AbstractManager at line 370
public setGeneratorConfig(GeneratorConfigInterface $generatorConfig)

Sets the GeneratorConfigInterface implementation.

Parameters

GeneratorConfigInterface $generatorConfig

at line 48
public setConnections(array $connections)

Set the database connection settings

Parameters

array $connections

at line 58
public array getConnections()

Get the database connection settings

Return Value

array

at line 63
public getConnection($datasource)

Parameters

$datasource

at line 72
public getAdapterConnection($datasource)

Parameters

$datasource

at line 86
public getPlatform($datasource)

Parameters

$datasource

at line 101
public setMigrationTable(string $migrationTable)

Set the migration table name

Parameters

string $migrationTable

at line 111
public string getMigrationTable()

get the migration table name

Return Value

string

at line 116
public getOldestDatabaseVersion()

at line 153
public migrationTableExists($datasource)

Parameters

$datasource

at line 167
public createMigrationTable($datasource)

Parameters

$datasource

at line 192
public updateLatestMigrationTimestamp($datasource, $timestamp)

Parameters

$datasource
$timestamp

at line 210
public getMigrationTimestamps()

at line 227
public getValidMigrationTimestamps()

at line 242
public hasPendingMigrations()

at line 247
public getAlreadyExecutedMigrationTimestamps()

at line 262
public getFirstUpMigrationTimestamp()

at line 269
public getFirstDownMigrationTimestamp()

at line 274
static public getMigrationClassName($timestamp)

Parameters

$timestamp

at line 279
public getMigrationObject($timestamp)

Parameters

$timestamp

at line 290
public getMigrationClassBody($migrationsUp, $migrationsDown, $timestamp)

Parameters

$migrationsUp
$migrationsDown
$timestamp

at line 356
static public getMigrationFileName($timestamp)

Parameters

$timestamp

at line 361
static public getUser()