Prisma migration not working with dolt
See original GitHub issueDiscussed in https://github.com/prisma/prisma/discussions/15786
<div type='discussions-op-text'>Originally posted by PavelSafronov October 14, 2022 Hi Prisma folks, Pavel with Dolthub here. Our product, dolt, provides a MySQL-like database, and one of our customers is experiencing issues while using Prisma+dolt, while the same migration works with Prisma+MySQL.
The error they are encountering is
Error: Error: unknown error: table not found: _prisma_migrations
0: migration_core::state::DevDiagnostic
at migration-engine/core/src/state.rs:251
But according to dolt DB logs, this error happens before Prisma queries the database for tables. Our current theory is that a different error is being originally thrown, and somehow causes the table not found
error. But that’s just a theory.
Here is a repro repo that can illustrate the issue: https://github.com/PavelSafronov/prisma-dolt-debug I’ve included DB and Prisma logs for both the successful (MySQL) and the unsuccessful (dolt) runs.
We’re kind of stuck here:
- We’ve enabled Prisma logs, but those don’t appear to capture the engine internals. Is there a way to get engine logs?
- We’ve tried stepping through the Node.js code, but this in turns calls the Rust engine code, and I’m not sure how to step through that code. Is there a way to debug the Rust engine code during a migration?
Any advice you have will be really appreciated.</div>
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
I’m not sure about how long this will take us to fix, but I don’t think Prisma should be special-casing our error messages, that seems like a bad idea. It might be a good idea to avoid preparing a statement this early in the process, but Prisma may have very valid reasons for doing what it’s doing right now.
Hi @janpio , here are the answers to your questions:
db push
with dolt, and that command succeeded. Curious.