2017 © Pedro Peláez
 

library doctrine-migrations-multi

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

image

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).

  • Wednesday, December 28, 2016
  • by IgorTimoshenko
  • Repository
  • 2 Watchers
  • 1 Stars
  • 737 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

doctrine-migrations-multi

Overview

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

Installation

To install doctrine-migrations-multi with Composer just add the following to your composer.json file:, (*2)

{
    "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:, (*3)

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

Now, Composer will automatically download all required files, and install them for you., (*4)

Usage

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

migrations-db-multi-example.php, (*6)

<?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):, (*7)

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., (*8)

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., (*9)

The Versions

28/12 2016

dev-master

9999999-dev http://github.com/IgorTimoshenko/doctrine-migrations-multi

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

  Sources   Download

MIT

The Requires

 

The Development Requires

database migrations doctrine

28/12 2016

0.9.0

0.9.0.0 http://github.com/IgorTimoshenko/doctrine-migrations-multi

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

  Sources   Download

MIT

The Requires

 

The Development Requires

database migrations doctrine