77 Commits

Author SHA1 Message Date
Chris Tsang
75d5c0f5ea Restructure sea-orm-cli & sea-orm-migration 2022-05-09 12:30:58 +08:00
Billy Chan
498c0154ca Restructure SeaORM migration
Bump codegen's sea-query version [cli]

Update CLI subcommand method

Move migration utility into sea-orm-migration
2022-05-09 12:30:55 +08:00
benluelo
b01d4887ca
Add max_connections option to CLI (#670)
Change max_connections option to default to 1

CLI generate entity with default max connection of 1
2022-04-26 22:55:24 +08:00
Alex
fe1877a49d
sea as an alternative bin name to sea-orm-cli (#558)
* Simplify bin name from  sea-orm-cli to sea

* -S

* fixed test
2022-03-26 18:06:14 +08:00
Billy Chan
0a06892aac Fix [cli] cargo publish failed 2022-02-07 20:55:16 +08:00
Billy Chan
8eb095385d Migration (#335)
* Refactor `ConnectionTrait`

* Refactoring

* Build index & foreign key statements

* Fix imports

* Fixup

* Rocket example with migration

* async-std compatible with the tokio 1.0 runtime

* Use reexported dependency

* Compile without selecting any db backend

* Updating sea-orm-cli dep

* sea-orm-cli migrate commands

* cargo fmt

* Test [cli]

* Refactoring

* Clap app name should be "sea-orm-cli"

* Correctly capture MIGRATION_DIR

* Rename README

* Add `sea-orm-cli migrate init` command

* Update README

* Try restructured sea-query dependency (SeaQL/sea-schema#41)

* Set `DATABASE_URL` environment variable
2022-02-05 20:34:54 +08:00
Billy Chan
a9fc52009e
CLI allow generate entity with url without password (#436)
* fix: cli allow generate entity with url without password

* test: no password test case should not panic

* test: fix test cases, assert panic message
2022-01-14 00:46:32 +08:00
Billy Chan
9036d27da7
Codegen SQLite (#386)
* Codegen SQLite

* Remove debugging

* Fixup

* Add SQLite "sakila.db" demo [issues]
2021-12-25 11:31:47 +08:00
Billy Chan
2d5aa2a61b
Log with tracing-subscriber (#399)
* 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
2021-12-24 23:59:37 +08:00
Forest Anderson
44da1cab0b Rearranged files, added fmt 2021-10-22 11:24:41 +08:00
Forest Anderson
8d06aea00b Added tests 2021-10-19 01:11:54 -04:00
Forest Anderson
a346b34299 Improve errors 2021-10-18 14:28:36 -04:00
Forest Anderson
bcc5b5066a Changed manual url parsing to use Url crate 2021-10-16 23:19:48 -04:00
Tim Eggert
b6c5d71fe2 Introduce optional serde support for model code generation
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
2021-10-11 14:55:00 +02:00
Jordy Ruiter
ba96917a18 Add tables option to CLI generate entity 2021-10-03 15:45:07 +09:00
baoyachi
86f2d7e327 fix #200
* adapter postgrel url scheme
* refactor DbScheme
2021-09-27 11:45:54 +08:00
Billy Chan
962d895249
Add CLI verbose option 2021-09-16 10:14:01 +08:00
Billy Chan
a6f117a908
sea-orm-cli with --expanded-format & --compact-format flags 2021-09-10 23:08:30 +08:00
Billy Chan
1765ac953b Add "--include-hidden-tables" flag 2021-08-11 12:45:24 +08:00
Billy Chan
10d670e472 Update CLI generate entity schema argument behavior 2021-08-11 12:45:24 +08:00
Chris Tsang
1b47f896a7 Tweaks 2021-08-08 03:11:37 +08:00
Billy Chan
3701c86637
CLI Generate Entity for Postgres (#61)
* cli generate entity for Postgres

* Fixup
2021-08-07 18:23:52 +08:00
Chris Tsang
d5f63a05c4 Tweaks 2021-07-29 23:18:37 +08:00
Billy Chan
0b10d30c64 Codegen not depends on sea-schema & sqlx 2021-07-27 21:48:41 +08:00
Billy Chan
47bb5b3ad7
sea-orm-cli showing help message when no sub-command provided 2021-07-02 10:42:56 +08:00
Billy Chan
fa30519f99 sea-orm-cli read config from .env, update command, rename binary to sea-orm-cli 2021-06-26 21:46:10 +08:00
Billy Chan
cab4b5a3f7
Codegen: Entity Generator (#23) 2021-06-19 19:47:59 +08:00