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
파일 보기
프로젝트 열기: openeyes/openeyes
공개 프로퍼티들
공개 메소드들
비공개 메소드들
메소드 상세
public run ( $args = null ) |
public setDbSchema ( CDbSchema $schema ) |
$schema |
CDbSchema |
|
프로퍼티 상세
$migrationPath 공개적으로 프로퍼티