Using JSON with SQLITE #4447
-
I have seen a couple issues and discussions about this however I am having trouble finding how to actually use it in a project
However when I run diesel migration run I get
My sqlite version is Cargo.toml
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
That's expected behaviour as there is no jsonb type in SQLite. See their documentation for details https://sqlite.org/datatype3.html |
Beta Was this translation helpful? Give feedback.
-
Okay I see so what is the correct way to to do this when I use TEXT and manually set the type in schema.rs to Json I get errors when using serde_json::Value in a models place This errors:
When I set schema.rs to
|
Beta Was this translation helpful? Give feedback.
These PR's are not part of any released diesel version yet. So it's expected that you cannot use this functionality on a released version.