PHP Class InitialDbMigrationCommand

How to consolidate 1) make sure you have the latest structure and data files up to the release you are consolidating to, for instance release 1.4.0 run "./yiic migrate" will update to the latest migration in this release. 2) Run "./yiic initialisedbmigration" This takes the current db status and data and prepares migration file/data structure that will recreate the database status as it is at that current moment 3) delete all tables and data in the database. 4) delete all previous migration files and old data within the data folder, make sure the new consolidation data and migration files are not removed. 5) run the "./yiic migration" command. It executes the new consolidation migration and restores the database structure and data to the consolidation. Example : migrated to 130913_000000 For modules consolidation generation there is no command available as automation is more difficult. But an helper has been created and it is available in the DevTools project https://github.com/openeyes/DevTools
Inheritance: extends CConsoleCommand
Afficher le fichier Open project: openeyes/openeyes

Méthodes publiques

Свойство Type Description
$migrationPath
$oeMigration

Méthodes publiques

Méthode Description
getDbSchema ( )
getTemplate ( )
run ( $args = null )
setDbSchema ( CDbSchema $schema )

Private Methods

Méthode Description
getLatestMigration ( ) : mixed
getMigrationFileName ( $name )
getOeMigration ( )
getUpCreateTablesStatements ( $tables )

Method Details

getDbSchema() public méthode

public getDbSchema ( )

getTemplate() public méthode

public getTemplate ( )

run() public méthode

public run ( $args = null )

setDbSchema() public méthode

public setDbSchema ( CDbSchema $schema )
$schema CDbSchema

Property Details

$migrationPath public_oe property

public $migrationPath

$oeMigration public_oe property

public $oeMigration