diesel_cli_ext icon indicating copy to clipboard operation
diesel_cli_ext copied to clipboard

deprecation warning for #[table_name] macro attribute

Open Niedzwiedzw opened this issue 2 years ago • 10 comments

warning: #[table_name] attribute form is deprecated
  = help: use `#[diesel(table_name = coin_transaction)]` instead

I'm getting this all over my project, I guess the macro has changed, but I'm not sure how would we handle the update here, maybe a cli flag specifying a version?

Niedzwiedzw avatar Sep 27 '22 14:09 Niedzwiedzw

should the expected usage be now #[sql_name="name"]?

abbychau avatar Sep 27 '22 14:09 abbychau

#[diesel(table_name = name)]

Niedzwiedzw avatar Sep 27 '22 14:09 Niedzwiedzw

but you said that is deprecated (#[table_name] attribute form is deprecated)

abbychau avatar Sep 27 '22 14:09 abbychau

warning: #[table_name] attribute form is deprecated
  = help: use `#[diesel(table_name = coin_transaction)]` instead

Niedzwiedzw avatar Sep 27 '22 14:09 Niedzwiedzw

I see. thank you

abbychau avatar Sep 27 '22 14:09 abbychau

it needs to be wrapped in #[diesel(...)]

Niedzwiedzw avatar Sep 27 '22 14:09 Niedzwiedzw

thank you, it is an amazing project and it saved me a lot of time :D

Niedzwiedzw avatar Sep 27 '22 14:09 Niedzwiedzw

@Niedzwiedzw 0.3.9 published

abbychau avatar Sep 28 '22 08:09 abbychau

it should containe the above syntax, use -v 1 to compat with diesel 1.x

abbychau avatar Sep 28 '22 08:09 abbychau

perfection

Niedzwiedzw avatar Sep 28 '22 18:09 Niedzwiedzw