96 Commits

Author SHA1 Message Date
Billy Chan
9fbfd06663
[CLI] a warm welcome message included :) (#1417)
* [CLI] a warm welcome message included :)

* Update layout

* update layout
2023-01-27 12:44:40 +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
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
Chris Tsang
b9c27f238d sea-orm-cli 0.10.3 2022-11-14 15:08:25 +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
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
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
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
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
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
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
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
Chris Tsang
a62a2755ad sea-orm-cli 0.9.0 2022-07-12 00:21:47 +08:00
Billy Chan
d6831e5295
Bump version of sqlx, sea-query, sea-schema, time and uuid (#834)
* 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
2022-07-05 01:05:11 +08:00
smonv
580fa90023
Bump clap version to 3.2 (#706)
* 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>
2022-06-26 20:52:33 +08:00
Billy Chan
2eb02cfbe0
Fix SeaSchema's SQLx version to ^0.5 (#798) 2022-06-17 12:20:16 +08:00
Chris Tsang
c466a169fb sea-orm-cli 0.8.1 2022-05-10 23:29:34 +08:00
Chris Tsang
e1f19ed801 sea-orm-cli 0.8.0 2022-05-10 00:04:48 +08:00
Viktor Bahr
3518acf1b9
CLI command to generate a new migration (#656)
* 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>
2022-05-09 21:31:12 +08:00
Chris Tsang
2794410a08 Update sea-schema 2022-05-09 21:02:53 +08:00
Chris Tsang
07c8af2b3a Use sea-schema's SchemaProbe 2022-05-09 17:04:12 +08:00
Chris Tsang
c466e46ae0 Fix tests 2022-05-09 14:44:12 +08:00
Chris Tsang
730b52088f Add tests 2022-05-09 12:31:12 +08:00
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
Chris Tsang
2cf0deeb2c sea-orm-cli 0.7.2 2022-03-27 20:51:10 +08:00
Chris Tsang
86fa15563d sea-orm-cli 0.7.1 2022-03-27 00:07:33 +08:00
Chris Tsang
a3c7381055 Update sea-schema 2022-03-27 00:06:48 +08:00
Chris Tsang
1e8c725eca sea-orm-cli 0.7.0 2022-03-26 18:30:18 +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
73701fef9a
Codegen Unsigned Integer - 2 (#397)
* 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>
2022-03-14 12:40:02 +08:00
Chris Tsang
54b1f4a226 Use caret requirements 2022-02-07 21:32:35 +08:00
Chris Tsang
f8ab11d36a Use sea-schema 0.5.1 2022-02-07 21:27:22 +08:00
Billy Chan
cd98137ad0 Update examples sea-orm version
Update example sea-schema version

Update [cli] sea-schema version
2022-02-07 20:55:15 +08:00
Chris Tsang
0e2ea839c2 sea-orm-cli 0.6.0 2022-02-07 00:10:52 +08:00
Chris Tsang
3cde517d2a Fix sea-schema dependency 2022-02-05 20:58:22 +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