PHP Класс 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
Наследование: extends CConsoleCommand
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$migrationPath
$oeMigration

Открытые методы

Метод Описание
getDbSchema ( )
getTemplate ( )
run ( $args = null )
setDbSchema ( CDbSchema $schema )

Приватные методы

Метод Описание
getLatestMigration ( ) : mixed
getMigrationFileName ( $name )
getOeMigration ( )
getUpCreateTablesStatements ( $tables )

Описание методов

getDbSchema() публичный Метод

public getDbSchema ( )

getTemplate() публичный Метод

public getTemplate ( )

run() публичный Метод

public run ( $args = null )

setDbSchema() публичный Метод

public setDbSchema ( CDbSchema $schema )
$schema CDbSchema

Описание свойств

$migrationPath публичное свойство

public $migrationPath

$oeMigration публичное свойство

public $oeMigration