saelker/migrations-bundle
Composer 安装命令:
composer require saelker/migrations-bundle
包简介
Symfony Bundle to handle migrations between multiple bundles
关键字:
README 文档
README
Update from 1.1.x => 1.2.x
Before updating to 1.2.x add to migration table the sequence column with type interger
Step 1: Install via Composer
composer reqire saelker/migrations-bundle
Step 2: Add to Your App Kernel
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Saelker\MigrationsBundle\SaelkerMigrationsBundle(), ); }
Step 3.1: Add Directories via config
# Saelker Migrations Directories saelker_migrations: directories: - '%kernel.project_dir%/src/AppBundle/Migrations' ...
Step 3.2: Add Directories via CompilerPass
class SaelkerMigrationsBundle extends Bundle { public function build(ContainerBuilder $container) { parent::build($container); $container->addCompilerPass(new MigrationsCompilerPass(__DIR__ . "/Migrations")); } }
Step 4: Run first migration
bin/console saelker:migrations:migrate
Step 5: Generate new migration
bin/console saelker:migrations:generate
Step 6: Modify saved path depth
# Saelker Migrations Directories saelker_migrations: clean_depth: 3 directory_separator: '/' use_camel_case: false ignore_errors: false
统计信息
- 总下载量: 9.3k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-07-04