* Add cli feature on sea-orm-migration
* Add cli feature on sea-orm-cli
* Remove async-std feature and add async-std in the default feature
Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
* Bump version of sqlx, sea-query, sea-schema, time and uuid
* PostgreSQL `u32` was wrapped in `Oid` (launchbadge/sqlx#1602)
* Update test cases
* Fix clippy warnings
* cargo fmt
* Fix clippy warnings
* Bump sea-schema to ^0.9.2
* Update test cases
* Pin on sea-query minor version
* bump clap to 3.1.17
sea-orm-migration: bump clap version to 3.1.17
sea-orm-cli: use clap derive API instead of builder API
sea-orm-migration: use clap derive
* Fix clippy warnings
* Migration CLI verbose with default value
* bump clap to 3.2
Co-authored-by: Thanh Van <tvt@smonv.com>
Co-authored-by: Billy Chan <ccw.billy.123@gmail.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>
* 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>