Skip to content
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

Adding multi database support to dbpatch #18

Open
melvin-ibuildings opened this issue Feb 9, 2012 · 1 comment
Open

Adding multi database support to dbpatch #18

melvin-ibuildings opened this issue Feb 9, 2012 · 1 comment
Labels

Comments

@melvin-ibuildings
Copy link

At this moment it is not possible to support multiple databases with just one config file.
A work around is having a config file for each database but this is not ideal.

It would be a good feature if a config file will support multiple databases with each its own settings and be able to execute dbpatch for that database/environment by using a parameter

@Dynom
Copy link

Dynom commented Apr 3, 2012

+1

I would like to see this feature implemented also. Instead of executing DbPatch for each schema and associated configuration file, I wouldn't mind having a single configuration file where everything can be define. Preferably with property inheritance. Also the invocation of DbPatch should receive an argument to specify for what "branches" or "schemas" patches should be run.

Use case

A use-case for this would be applications using a SOA architecture, with loosely coupled end-points and schemas. In this situation a schema might be named after an end-point and there is no relation on database level. E.g.:

A relation between customer and offers are defined as:

customer.customer_has_offer
- customer_id (e.g.: 42)
- offer_ref (e.g.: http://api.example.com/offer/4e1f )

Config proposal

Configuration proposal:

[ dbpatch ] ; -- Reserved section, other sections are schema definitions
limit = 10
...

db.adapter = Mysqli
..

[ schema_A ]
schema_name = schema_A
patch_prefix = schema_a.
...

[ schema_B : schema_A ] ; -- Inherit all from schema_A, "want to have" might not make much sense
schema_name = schema_B
patch_prefix = schema_b.
...

Inheritance implementation examples:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants