* CI compile migrator CLI
* sea-orm-migration's CLI with only migration subcommand
* Fix clippy warnings
* Fixup
* `sea-orm-cli migrate init`: write sea-orm-migration version based on CLI version
* feat(cli): add 'migration generate' subcommand
This subcommend will create a new, empty migration.
* feat(deps): add chrono crate
This crate will allow me to fetch the current date and time required for
generating the migration filename.
* feat(cli): generate migration filename
* feat(cli): read template, replace migration name
* feat(cli): write modified content to file
* feat(deps): add regex crate
Allows me to parse the lib.rs file containing the migrator logic.
* fix(cli): add missing chrono import
* feat(cli): mod declaration for new migration
This modifies the existing migator file, adding a module declaration for
the newly generated migration.
* feat(cli): regenerate migration vector
* feat(cli): write updated migrator file to disk
This completes updating the migrator file with the new migration
information.
* docs(cli): additional docstring
* refactor(cli): move logic into functions
* test(cli): create new migration happy path
* test(cli): update migrator happy path
* fix(cli): dedicated tmp dir for test
This avoids conflicts with the other tests.
* style(cli): align generated code with cargofmt
As suggested by @billy1624 in the review of #656.
* feat(cli): harden regex against extra spaces
As suggested by @billy1624 in the review of #656.
Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
* feat: codegen unsigned integer
* feat: apply alias on `ColumnRef::SchemaTableColumn`
* Update SQLite test cases, quote identifier with double quotes
* Bump sea-query version to 0.22
* Add dummy line
* Tests [cli] and [issues]
* update sea-schema
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
* chore: log examples with tracing-subscriber
* chore: log [issues] with tracing-subscriber
* chore: log [cli] with tracing-subscriber
* feat: tracing will emit log if tracing-subscriber is not setup
This introduces several things to optionally support automatic derive attributes for `serde::{Deserialize, Serialize}` for the generated models:
- introduces a `WithSerde` enum to indicate if Serialize, Deserialize, or even both should be derived from,
- adds an optional cli argument `--with-serde [none: default, serialize, deserialize, both]`
- adds test harness for both compact and expanded generation