sea-orm-cli hard codes schema
DenuxPlays opened this issue · 0 comments
DenuxPlays commented
Description
When using the sea-orm-cli like this:
sea-orm-cli generate entity -o entity/src/new \
--lib \
--with-copy-enums \
--with-serde both \
--date-time-crate time\
-u postgresql://docker:root@localhost:5432/docker
Sea-orm generates something like this:
#[sea_orm(schema_name = "public", table_name = "account")]
Hard coded schema name is generally not a good idea as the user maybe want to use a different schema.
Also there is already the DATABASE_SCHEMA
env var that would become obsolete.
Steps to Reproduce
- execute the command above
- see the hard coded schema
Expected Behavior
Just do not generate the schema like before.
Generate this instead:
#[sea_orm(table_name = "account")]
Actual Behavior
Generates this:
#[sea_orm(schema_name = "public", table_name = "account")]
Reproduces How Often
Every time
Workarounds
Just remove it afterwards
Reproducible Example
https://github.com/financrr/financrr-app/tree/main/backend
Versions
v1.0.0-rc.4