承接 imt/doctrine-migrations-multi 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

imt/doctrine-migrations-multi

Composer 安装命令:

composer require imt/doctrine-migrations-multi

包简介

This repository provides a simple script that adds the ability to use Doctrine Migrations with more than one (multiple) connection (database).

README 文档

README

Overview

This repository provides a simple script that adds the ability to use Doctrine Migrations with more than one (multiple) connection (database).

Installation

1. Using Composer (recommended)

To install doctrine-migrations-multi with Composer just add the following to your composer.json file:

{
    "require": {
        "imt/doctrine-migrations-multi": "0.9.*"
    }
}

Then, you can install the new dependencies by running Composer's update command from the directory where your composer.json file is located:

$ php composer.phar update imt/doctrine-migrations-multi

Now, Composer will automatically download all required files, and install them for you.

Usage

To start using doctrine-migrations-multi create the migrations-db-multi.php file that returns an array of connections:

migrations-db-multi-example.php

<?php

return [
    'foo' => [
        'dbname'   => 'foo',
        'user'     => 'foo',
        'password' => 'foo',
        'host'     => 'localhost',
        'driver'   => 'pdo_mysql'
    ],
    'bar' => [
        'dbname'   => 'bar',
        'user'     => 'bar',
        'password' => 'bar',
        'host'     => 'localhost',
        'driver'   => 'pdo_mysql'
    ],
];

Then, run doctrine-migrations-multi with needed command (for instance with migrations:migrate):

php vendor/bin/doctrine-migrations-multi \
    migrations:migrate \
    --configuration=<path-to>/migrations.yml \
    --connection=foo \
    --db-configuration-multi=<path-to>/migrations-db-multi.php

Testing

$ make test

Contributing

Please see CONTRIBUTING for details.

Credits

License

This library is released under the MIT license. See the complete license in the LICENSE file that is distributed with this source code.

统计信息

  • 总下载量: 755
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-12-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固