-
Notifications
You must be signed in to change notification settings - Fork 65
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
Configurable migration table name #4
Comments
It's something that takes no time to implement, but will need to implement a custom insert function or only allow to add more fields to the current schema, and for me personally I don't think it's necessary. |
Within the changes to implement custom migration table name, I'll also do:
|
I have the need for a configurable migration table, as I want to run migrations from several different applications against the same database, and so I'll have multiple files with the same index (e.g. I'm happy to open a pull req, but am having trouble understanding this sentence from above:
My thinking is that this task would require two updates:
Does this approach sound correct? |
@boblauer Before I have a look at the PR I'd like to get a better understanding of your use case, to make sure this is the best solution to the problem. Specifically I'm interested in:
Something doesn't feel right about this to me. Could you explain a bit more about why things are set up this way, rather than each application having its own database? The problem I see is that each application could be trying to migrate the same database in different directions, and they could all have inconsistent views on what the current state is. |
Sure thing. These smaller applications make up a larger ecosystem, for lack of a better word. So they all share a few common tables, such as Each app will only modify the tables that it is responsible for. In other words, if the app wasn't responsible for creating the table, it will never make updates to the table. |
This sounds like a microservice architecture where the services are using the database as their integration point. This is generally considered an anti-pattern, and not something I want to support. Here are some resources to learn more about this:
If you are working on a microservices-style system, I'd also recommend Building Microservices by Sam Newman. Admittedly I don't know anything about your application or use-case, but I would advise keeping the services separate, with their own databases. If several of them need access to e.g. |
The fixed migration table name is a bit meh, would be useful to configure it.
Would it be useful to be able to specify a schema for the migration table?
@rafakato
The text was updated successfully, but these errors were encountered: