-
Notifications
You must be signed in to change notification settings - Fork 110
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
A way to use the original Repo #33
Comments
You can simply make 2 repo modules, one with However, beware that each repo has their own connection pool |
Yeah it's not as simple as that, as they have their own connection pool, configuration and migrations etc. |
your secondary repo doesn't have to have migrations, and the config to both repos can be the same (even coming from the same variable in config.exs). I agree, a seperate connection pool might be a problem. You can alternatively call ExAudit.Schema.insert(MyRepo, MyRepo.get_dynamic_repo(), my_changeset, []) ExAudit's wrapper around Ecto.Repo does nothing else really. |
I'll consider defining a few important functions like insert, update, delete, history and rollback in the |
Yes that would be great. I agree it's definitely a solution to have a separate Repo, but there are trade-offs and it would be great to have an explicit API to ExAudit that doesn't involve taking over the Repo module. |
It would be great if we can use the modified Repo of
ex_audit
as a separate module that calls the original Repo, so it will not completely replace the Repo, something likeVersionedRepo
. If parts of the app are potentially versioned (for instance a CMS), and other parts are not (the user-facing app), as in our case, I'd like to not have the performance impact of versioning on the user-facing app when I know versioning is not involved there.The text was updated successfully, but these errors were encountered: