Schema splitting #5972
|
Hire there! I have dynamic env which affects which kind of db I use. For ex, I use sqlite for dev and testing, and postgreesql for prod. Does it possible to split |
Replies: 2 comments 1 reply
|
Currently it's not possible to split schema files, but you can follow these requests for more details: As for testing, you replace As a suggestion, I would recommend sticking to the same database for tests so that you do not need to refactor your test logic when you add Postgres specific feature not supported by SQLite (like Enums). |
|
Hi there, To keep our discussions organized and focused on the most relevant topics, we’re reviewing and tidying up our backlog. As part of this process, we’re closing discussions that have already been marked as answered but remain open. If this discussion still requires further input or clarification, feel free to reopen it or start a new one with updated details. Your contributions are invaluable to the community, and we’re here to help! For more details about our priorities and vision for the future of Prisma ORM, check out our latest blog post: https://www.prisma.io/blog/prisma-orm-manifesto. Thank you for your understanding and ongoing support of the Prisma community! |
@awinogradov 👋
Currently it's not possible to split schema files, but you can follow these requests for more details:
#2443
#2377
As for testing, you replace
postgresqltosqliteprogrammatically and then runprisma generate. This will make sure that you use SQLite for tests.As a suggestion, I would recommend sticking to the same database for tests so that you do not need to refactor your test logic when you add Postgres specific feature not supported by SQLite (like Enums).