* 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
* Override column name with the name of model field in `DeriveEntityModel` macros [issues]
* Fixup: trim prefix and tailing underscore
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
* 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>