Skip to content
Discussion options

You must be logged in to vote

Diesel-cli currently does not really support emitting a schema.rs file for tables without primary keys. You can workaround that by manually writing the relevant table! macro calls and declaring some column as fake primary keys there.

As for the column names starting with a number: You should be able to get these working by using the #[sql_name = "123abc"] attribute on the relevant column + by choosing a valid rust identifier as column name in the table! macro invocation.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by tbillington
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants