Closed chronicl closed 1 year ago
I don't think #[cfg(debug)]
is valid, I think it was intended to be #[cfg(debug_assertions)]
. playground
I will do a PR to fix that now.
It's worth noting that #[cfg(debug_assertions)]
means the next line will only run the database migrations in non-release builds. Eg. If you do cargo run --release
it will skip the _db_push
call and you will run into the same issue as you have right now, it is done this way in the example because for most production use cases you will want to use the Prisma CLI to manage migrations instead of them being automatic.
I'm getting the following error when trying to use sqlite as the database
Here is a repo for reproducibility https://github.com/chronicl/prisma-client-rust-bug .
I saw #28 and tried moving the schema.prisma file into the root without success.