Add option to generate SQL based on schema.rs
#2651
Replies: 2 comments
-
I definitively can understand why people may want to have such a feature. The point is it is much more complicated to get that really right as it seem at the first look. Additionally I think it's currently not possible to encode some constraints (like unique constraints and so on, or general indices) as part of a |
Beta Was this translation helpful? Give feedback.
-
@weiznich Thanks for your input, I'll be looking into creating a crate such as the one you suggested |
Beta Was this translation helpful? Give feedback.
-
As Diesel generates the
schema.rs
file from SQL, it would be great to have an option to do the reverse. I could define my tables insideschema.rs
and run a command to generate the SQL. As many full-stack developers have never written SQL, having this option would make it easier to get started with Diesel. This is inspired by Typeorm which generates SQL in the background from Typescript classes instead of generating Typescript classes from SQL.Beta Was this translation helpful? Give feedback.
All reactions