Closed Josh-Walker-GM closed 1 month ago
@Josh-Walker-GM Yeah. It's broken now with Prisma's latest changes in. I'm chatting with them but kind of have to start from scratch and audit again to see where we look of the db and where we look for the schema models.
This has been fixed now that redwood has updated to v5.18.0 of prisma.
What's not working?
This isn't strictly a bug in redwood but I am creating this issue to track what we want to do about the new behaviour (if we care to do anything at all).
In prisma v15.6.0 they made some breaking changes to the multi file schema preview feature:
We added support for this in redwood recently. There was a slight difference in behaviour when I tested the multi file schema behaviour before and after the upgrade. The location that the database file resolves to is different.
If you setup the test project you'll get a sqlite database file in the standard spot. If you now enable prisma multi file schema and then perform some action like
yarn rw prisma migrate reset
you'll observe a new database file generated in a different location. This is mentioned in prisma's first point above.The result of following the reproduction steps below. Observe multiple database files:
Maybe this is just something users should expect given prisma have changed their behaviour and we have nothing to do here? Perhaps we should add documentation to highlight this to our users?
I'll leave it up to @dthyresson to how to go forward but happy if you want to just close this as expected behaviour.
How do we reproduce the bug?
yarn rw prisma migrate reset
What's your environment? (If it applies)
No response
Are you interested in working on this?