devture/pimple-provider-phinx-migrations
最新稳定版本:1.0.1
Composer 安装命令:
composer require devture/pimple-provider-phinx-migrations
包简介
Pimple Services Provider which provides DB migrations powered by Phinx
README 文档
README
This is a Pimple Service Provider which provides database migrations console commands, powered by Phinx.
Configuration
$dbMigrationsConfig = [ 'environments' => [ 'default_database' => 'development', 'development' => [ 'adapter' => 'mysql', 'charset'=> 'utf8', 'collation' => 'utf8_general_ci', 'uri' => 'username:password@localhost/db_name', ], 'paths' => [ 'migrations' => 'migrations', ], 'migrations_base_path' => '/path/to/migrations-directory-parent', ], ];
Usage
$container = new \Pimple\Container(); $container['console'] = function () use ($container) { $console = new \Symfony\Component\Console\Application(); // Register some other console commands here // Register the services provided by this service provider $container->register(new \Devture\PimpleProvider\PhinxMigrations\ServiceProvider($dbMigrationsConfig)); // Attach the console commands provided by this service provider with this console instance $container['devture_phinx_migrations.attach_commands_to_console']($console); return $console; }; $container['console']->run();
统计信息
- 总下载量: 22
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2022-12-17