-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Conflicts in the "module 'zapatos/schema'" when multiple schemas for different dbs used in same project #54
Comments
Hmm — with the new ambient declaration design, I'm not sure there's any way to support multiple DBs in once codebase. Happy to be corrected if anyone can work this out. |
To make the problem simpler, I am not really trying to run queries in two DBs in the same repo. I use SQL as the source of truth to decide the shape of my objects. (The only option I have in the current situation is to stick to v2.0.1) |
Hmm, this seems related to #49. The question is if we can find a new way of using the generated types from the Zapatos code that works for everyone, and doesn't involve copying the module wholesale into your code tree ... |
As an alternative to always exporting as 'zapatos/schema', it could be useful to be able to define the module name in the configuration file. That way one could configure each database to generate a differently named module and no other changes would be necessary. |
I don't think this would work, I'm afraid, since the shortcuts all refer to See also related discussion in #49 about whether to bring back the v2 approach alongside the v3 approach. |
Closing this since the solution — bringing back the v2 approach of copying code as an option — seems to be common with #49. |
We have two different databases, with two different schemas, maintained in two different repos (Say A and B).
When both A and B get imported into the same third repo (say C), because of using
/// <reference types="./zapatos/schema" />
twice, I get the following error:Am I using this in an unintended way or doing something wrong?
The text was updated successfully, but these errors were encountered: