Repository: Brendonovich/prisma-client-rust (language: rust)

Issue:
table doesn't exist
I'm getting the following error when trying to use sqlite as the database

> thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Execute(Error { is_panic: false, inner: Known(KnownError { message: "The table `main.User` does not exist in the current database.", meta: Object {"table": String("main.User")}, error_code: "P2021" }), batch_request_idx: None })', src\bin\main.rs:18:10

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.


Discussion / hints:

Fix patch:
diff --git a/examples/actix/src/main.rs b/examples/actix/src/main.rs
index 2afb7321..3dae3c1c 100644
--- a/examples/actix/src/main.rs
+++ b/examples/actix/src/main.rs
@@ -68,7 +68,7 @@ async fn create_post(
 async fn main() -> std::io::Result<()> {
     let client = web::Data::new(db::new_client().await.unwrap());
 
-    #[cfg(debug)]
+    #[cfg(debug_assertions)]
     client._push_db(false).await.unwrap();
 
     HttpServer::new(move || {
diff --git a/examples/axum-rest/src/main.rs b/examples/axum-rest/src/main.rs
index 5e5b7f5a..a1035b88 100644
--- a/examples/axum-rest/src/main.rs
+++ b/examples/axum-rest/src/main.rs
@@ -8,7 +8,7 @@ pub mod routes;
 async fn main() {
     let prisma_client = Arc::new(db::new_client().await.unwrap());
 
-    #[cfg(debug)]
+    #[cfg(debug_assertions)]
     prisma_client._db_push(false).await.unwrap();
 
     let app = Router::new()
diff --git a/examples/rspc/src/main.rs b/examples/rspc/src/main.rs
index deca8389..b5f02b7f 100644
--- a/examples/rspc/src/main.rs
+++ b/examples/rspc/src/main.rs
@@ -16,7 +16,7 @@ async fn main() {
     client._db_push().await.unwrap();
 
     // A router doesn't do anything on its own, you need to use it with
-    // an integration to make it do anything: https://rspc.otbeaumont.me/
+    // an integration to make it do anything: https://rspc.dev/
 
     Router::<Ctx>::new()
         .config(Config::new().export_ts_bindings("./bindings.ts"))


Test patch: