We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
table!
diesel = { version = "2.1.0", features = ["mysql", "chrono"] }
Can't use the sql_name attribute without getting a compiler error.
diesel::table! { sonardefects (id) { id -> Integer, #[max_length = 32] key -> Varchar, #[sql_name = "type", max_length = 32] type_ -> Nullable<Varchar>, } }
Renaming a table column from type to type_
no compile error
error: Invalid `table!` syntax. Please see the `table!` macro docs for more info. Docs available at: `https://docs.diesel.rs/master/diesel/macro.table.html` --> src/schema.rs:842:1 | 842 | / diesel::table! { 843 | | sonardefects (id) { 844 | | id -> Integer, 845 | | #[max_length = 32] ... | 864 | | } 865 | | } | |_^ | = note: this error originates in the macro `diesel::table` (in Nightly builds, run with -Z macro-backtrace for more info)
No
Using code block above causes the compiler to fail.
Comment out the attribute makes the code compile!
diesel::table! { sonardefects (id) { id -> Integer, #[max_length = 32] key -> Varchar, #[/*sql_name = "type",*/ max_length = 32] type_ -> Nullable<Varchar>, } }
The text was updated successfully, but these errors were encountered:
Duplicate of #3692
Sorry, something went wrong.
No branches or pull requests
Setup
diesel = { version = "2.1.0", features = ["mysql", "chrono"] }
Versions
Feature Flags
Problem Description
Can't use the sql_name attribute without getting a compiler error.
What are you trying to accomplish?
Renaming a table column from type to type_
What is the expected output?
no compile error
What is the actual output?
Are you seeing any additional errors?
No
Steps to reproduce
Using code block above causes the compiler to fail.
Comment out the attribute makes the code compile!
Checklist
closed if this is not the case)
The text was updated successfully, but these errors were encountered: