-
-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
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
Why does sea-orm-cli generate entity not include Cargo.toml file #805
Comments
tasks:
migrate:orm:model:
cmds:
- sea-orm-cli generate entity -u ${DATABASE_URL} -o {{.APP_NAME}}/src
- cd {{.APP_NAME}}; cargo init --lib;
- cd {{.APP_NAME}}; mv src/mod.rs src/lib.rs;
- cd {{.APP_NAME}}; cargo add serde@1 --features derive
- cd {{.APP_NAME}}; cargo add sea-orm@0.9
vars:
APP_NAME: "entity"
ignore_error: true |
Maybe we can add a flag? Generate mod or new crate? |
Yeah, related discussion |
May be sea-orm support config this all option into file. and then exec :sea-orm-cli, that all people can read file config known how to do it. |
Do you mean |
Yeah, that's what I'm thinking. By default, it generate a module which is the current behaviour. We can introduce a new flag |
I'll open this issue for anyone interested to contribute :) |
If there are too many configurations of sea ORM cli, consider the configuration method: e.g: ➜ ls
├── Cargo.toml
├── README.md
├── sea-orm.toml
├── migration
├── src All configuration write in The more options sea ORM cli has, the more complex it is to use,not friendly. |
Maybe we can solve this by introducing This would reduce the number of manual steps required of setting up a project, thus improving developer experience. We also could introduce a flag which controls whether to create a module or a |
@billy1624 The required features are still not decided but I can say we are looking for 2 things
|
Description
Steps to Reproduce
~ sea-orm-cli generate entity \ -o entity/src \ --with-serde both
Versions
Additional Information
I expect whole cargo library. But now ,lost Cargo.toml not running. Need I add manully
The text was updated successfully, but these errors were encountered: