-
Notifications
You must be signed in to change notification settings - Fork 892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple databases #1241
Multiple databases #1241
Conversation
…hrough to the manager to discover files
…to the same format
Codecov Report
@@ Coverage Diff @@
## master #1241 +/- ##
==========================================
+ Coverage 74.63% 74.86% +0.22%
==========================================
Files 35 35
Lines 4739 4881 +142
==========================================
+ Hits 3537 3654 +117
- Misses 1202 1227 +25
Continue to review full report at Codecov.
|
Conflicts |
In response to #180 and my own requirement to manage multiple databases for a single application I've implemented the ability to specify multiple database connections within the Phinx config and within many environments and have each track it's own migrations.
The existing functionality remains and it is still possible to use the original configuration schema of environments and single database connections as child properties. To ensure backwards compatibility the root paths options must remain in config even when using multiple databases with their own migration and seed paths specified.
Migrations and seed files are separated in different directories and can still utilise namespacing if required.
The command seeds:run has been updated to allow an optional -d or --database option with the expected value being the database reference specified in the config (e.g. db_ref_1)