151 Commits

Author SHA1 Message Date
Billy Chan
cbd7a8d1c9
Cleanup the use of vec![] (#1367)
* Public methods accept any IntoIterator as argument

* refactoring
2023-01-11 14:17:06 +08:00
Billy Chan
e246d3faaf
Cont. Upgrade to SeaQuery 0.28.0 (#1366)
* Upgrade to SeaQuery 0.28.0

* Remove unnecessary heap allocation

* Upgrade sea-query-binder

* Upgrade sea-schema

* Fix

* Upgrade sea-schema

* refactoring

Co-authored-by: Ivan Krivosheev <py.krivosheev@gmail.com>
2023-01-05 20:41:28 +08:00
Billy Chan
384ac1bea6
Cont. sea-orm-cli Implement derives & attributes parameters for entity generation (#1321)
* sea-orm-cli Implement derives & attributes parameters for entity generation (#1124)

* implement derives & attributes for cli

* fmt and clippy fix

* use comma delimiter for attributes arg

* Update help message use `'` instead of `"` to quote

* Refactoring

* remove unnecessary cloning

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>

* [CLI] generate model with extra derives and attributes

* clippy

Co-authored-by: Isaiah Gamble <77396670+tsar-boomba@users.noreply.github.com>
2022-12-20 12:59:42 +08:00
Billy Chan
9282ce2ded
Cont. Add serde skip options for hidden columns to the CLI (#1320)
* Add serde skip options for hidden columns to the CLI (#1171)

* Add serde skip options for hidden columns to the CLI

* Resolve rustfmt and clippy issues

* Use SerdeDeriveOptions instead of WithSerde in tests

* Resolve upstream conflict

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>

* [CLI] serde_skip_hidden_column

* clippy

* clippy

Co-authored-by: Jacob Trueb <jtrueb@northwestern.edu>
2022-12-20 00:43:21 +08:00
Billy Chan
3f00725ee2
Cli serde skip deserialize for primary key option (#1186) (#1318)
* Cli serde skip deserialize for primary key option (#1186)

* Add CLI option to skip primary keys with serde

Implements: https://github.com/SeaQL/sea-orm/issues/841

* Codegen: fix tests

* complete skip_deserialize cli feature

* run fmt

* fix tests

Co-authored-by: witcher <witcher@wiredspace.de>

* [cli] should be `#[serde(skip_deserializing)]`

* [CLI] code refactor

* [cli] rename

Co-authored-by: Isaiah Gamble <77396670+tsar-boomba@users.noreply.github.com>
Co-authored-by: witcher <witcher@wiredspace.de>
2022-12-19 22:11:45 +08:00
Billy Chan
33a665c683
[CLI] sea-orm-cli depends on codegen of the same version (#1299) 2022-12-17 12:59:16 +08:00
Billy Chan
b2185af559
Cleaning up dependency (#1300)
* Dependency version cleanup

* Update build tool

* Disable default features

* [cli] disable default features
2022-12-16 15:52:00 +08:00
Billy Chan
d32e1eb058
[CLI] fixup - generate entity file for all tables by default (#1251) 2022-11-24 20:21:52 +08:00
Billy Chan
d30a5612f8
[CLI] generate entity file for specified tables only (full text matching, not substring matching) (#1245) 2022-11-24 12:21:16 +08:00
Chris Tsang
b9c27f238d sea-orm-cli 0.10.3 2022-11-14 15:08:25 +08:00
Billy Chan
d6ca491d80
[CLI] Generate entity Postgres connection with schema search path (#1212) 2022-11-09 15:01:44 +08:00
Chris Tsang
ac00118808 sea-orm-cli 0.10.2 2022-11-06 21:03:36 +08:00
Chris Tsang
40e44b31dd Update MSRV to 1.65 2022-11-06 21:03:35 +08:00
Billy Chan
9dfc481c3b
Fix clippy warnings (#1188)
* Fix clippy warnings

* More fixes
2022-11-04 19:14:31 +08:00
Billy Chan
8b748d290a
sea-orm-cli 0.10.1 2022-10-27 16:03:37 +08:00
Billy Chan
c91aa354b4
Bump sea-schema to 0.10.2 2022-10-27 15:41:10 +08:00
Billy Chan
9108e74dac
Fix conflicting short flag -u when executing sea-orm-cli migrate generate command (#1157) 2022-10-26 21:01:24 +08:00
Billy Chan
32061e30b5
Added check to make sure migration name is valid (#1155)
Co-authored-by: Forest Anderson <forestkzanderson@gmail.com>
2022-10-26 18:19:51 +08:00
Rheydskey
9f2eb3d46c
Add cli feature on sea-orm-migration (#978)
* 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>
2022-10-26 17:48:06 +08:00
Billy Chan
cb76b8f443
[cli] migrate up should apply all pending migrations (#1010) 2022-10-26 17:21:24 +08:00
Billy Chan
f65340680a
[cli] FIXUP - correctly generate entity with Postgres Enum field (#1153) 2022-10-26 17:01:58 +08:00
Billy Chan
b5b9790252
Support array datatype in PostgreSQL (#1132)
* PostgreSQL array (draft)

* Fixup

* Fixup

* Fixup

* Fixup

* Fixup

* Refactoring

* generate entity for Postgres array fields

* Add tests

* Update Cargo.toml

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2022-10-23 18:26:57 +08:00
Chris Tsang
8d7230d6ec Dependency 2022-10-19 00:21:47 +08:00
Billy Chan
4df9a2672a
Fixup 2022-10-18 19:06:38 +08:00
Billy Chan
b22db842e4
Run migrations on PostgreSQL schema (#1056)
* Run migrations on PostgreSQL schema

* fmt

* fmt & clippy

* clippy

* [cli] update helper text
2022-10-17 17:16:00 +08:00
Billy Chan
18215871ba
[cli] make dotenvy and async-std optional dependencies (#1116) 2022-10-16 18:10:52 +08:00
Horu
d9ac2f1509
fix(deps): dotenv -> dotenvy (#1085) 2022-10-05 23:19:48 +08:00
Animesh Sahu
ad5e8c1264
[cli] Add -u, --universal-time option in generate to use Utc instead of Local (#947) 2022-09-25 10:33:50 +08:00
Horu
6816e86f4d
[cli] Add -l/--lib flag (#953)
* [cli] Add `-l`/`--lib` flag

* [cli] Change function name to reflect functionality
2022-09-25 10:31:26 +08:00
Daniel Porteous (dport)
d77cf24e06
Fix typos in ORM CLI help messages (#1060) 2022-09-23 15:36:10 +08:00
Remo Senekowitsch
be0d846d8f
Enable migration generation in modules (#933)
* Enable migration generation in modules

Previously, migration generation expected migrations
to be at the crate root.

* Fix migration backup file extension

* Document behavior of migration_dir
2022-09-19 23:42:46 +08:00
Billy Chan
d016f66a5f
Cargo.toml specify SeaORM homepage 2022-09-02 15:12:16 +08:00
Chris Tsang
13b53369e2 Prepare for 0.10.0 2022-08-20 22:47:31 +08:00
Chris Tsang
8dd19831cc sea-orm-cli 0.9.2 2022-08-20 14:06:55 +08:00
Chris Tsang
632471a526 Update chrono version 2022-08-14 00:46:38 +08:00
Chris Tsang
5dd28509af
Merge pull request #950 from robjtede/x-chrono-def
exclude chrono default features
2022-08-14 00:05:05 +08:00
Billy Chan
43495de0aa
Fix clippy warnings - 1 (#967)
* Fix clippy warnings

* cargo fmt

* Fix clippy warnings

* cargo fmt
2022-08-12 20:02:53 +08:00
Igor
0d94941c3b
Fix typos (#958) 2022-08-12 18:31:35 +08:00
Rob Ede
5735c25e69
exclude chrono default features 2022-08-08 15:15:54 +02:00
Ivan Krivosheev
2731878d0e Set minimal rustc version 2022-08-07 02:34:43 +03:00
Erik Rhodes
5fbc336de0 [cli] added with-copy-enums flag to cli and conditional derive 2022-08-06 16:45:28 +08:00
Billy Chan
c4fa40ab3e
[cli] migrator CLI handles init and generate commands 2022-08-02 16:30:49 +08:00
Jinwoo Park
cf124014e8
Simple spelling issues on sea-orm-cli's toml source. (#918) 2022-07-27 17:39:09 +08:00
Chris Tsang
39ef805e7b sea-orm-cli 0.9.1 2022-07-22 00:14:25 +08:00
Billy Chan
018dcdff92
[cli] bump sea-schema to 0.9.3 (SeaQL/sea-orm#876) 2022-07-20 16:42:59 +08:00
Billy Chan
0f568018a5
sea-orm-cli 0.9.1 2022-07-14 17:45:55 +08:00
Billy Chan
0a55d3ea67
Edit CLI docs 2022-07-14 17:45:36 +08:00
Billy Chan
60bf6da8dd
sea-orm-cli migrate generate should take file name as argument instead of option (#870) 2022-07-14 17:43:21 +08:00
Billy Chan
c949a33678
Update docs 2022-07-13 13:07:05 +08:00
Chris Tsang
a62a2755ad sea-orm-cli 0.9.0 2022-07-12 00:21:47 +08:00