1660 Commits

Author SHA1 Message Date
Chris Tsang
5dec47e441 Changelog 2022-05-09 22:09:52 +08:00
Billy Chan
840f8f6148
DeriveEntityModel macros override column name (#695)
* 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>
2022-05-09 22:08:59 +08:00
Chris Tsang
6e1e0a3d80 Changelog 2022-05-09 22:07:35 +08:00
Chris Tsang
2da0429f41 Changelog 2022-05-09 22:06:23 +08:00
Billy Chan
5a123b36aa
DerivePrimaryKey with custom primary key column name (#694)
* `DerivePrimaryKey` with custom primary key column name

* Add test cases [issues]
2022-05-09 22:00:04 +08:00
Kirawi
23e95761ca
add is_changed to ActiveModelTrait (#683)
* add is_changed to ActiveModelTrait

* add test for `ActiveModelTrait::is_changed()`
2022-05-09 21:58:20 +08:00
Chris Tsang
415ec78681 Changelog 2022-05-09 21:40:12 +08:00
Chris Tsang
1283d9d325 Tweaks 2022-05-09 21:39:41 +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
b8214b233c Edit 2022-05-09 21:22:28 +08:00
Chris Tsang
6c17a62084 Changelog 2022-05-09 21:21:48 +08:00
Chris Tsang
468d704bb0
Merge pull request #677 from SebastienGllmt/patch-1
Derive extra error traits
2022-05-09 21:19:02 +08:00
Chris Tsang
30e7f42233
Merge pull request #703 from ttys3/axum_example_v0.5.4
chore: update axum to 0.5.4 and fix up .env database name typo
2022-05-09 21:15:20 +08:00
Chris Tsang
2794410a08 Update sea-schema 2022-05-09 21:02:53 +08:00
Chris Tsang
25f3db731b
Merge pull request #666 from SeaQL/sea-schema/dump-sea-orm-dep
Dump SeaORM Dependency from SeaSchema's Migrator
2022-05-09 19:48:43 +08:00
Chris Tsang
b622a6e1aa Tweaks 2022-05-09 18:37:37 +08:00
Chris Tsang
31cdecf549 Use SchemaProbe fully 2022-05-09 18:17:44 +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
e0d7d2bc78 Fix tests 2022-05-09 13:51:21 +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
ttyS3
4b9eeec739
chore: update axum to 0.5.4 and fix up .env database name typo 2022-05-09 03:18:51 +08:00
Chris Tsang
86e7e808b3 Changelog 2022-04-27 00:06:48 +08:00
Chris Tsang
6308ee7c45 Update sea-query 2022-04-26 23:48:36 +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
Billy Chan
664f42d22d
cargo fmt 2022-04-26 12:24:17 +08:00
Sebastien Guillemot
2f4eadcbac
Derive extra error traits 2022-04-19 19:37:20 +09:00
Chris Tsang
66ba234156 Readme 2022-04-18 23:53:47 +08:00
Chris Tsang
2e12e29c38 Readme 2022-04-18 23:17:52 +08:00
Chris Tsang
d6fb93e48c Update sea-query 2022-04-18 17:18:10 +08:00
Chris Tsang
b052b2eb94
Merge pull request #675 from SeaQL/update-sea-query
Update sea query
2022-04-18 11:28:04 +08:00
Chris Tsang
53b6819a80 Test patched sea-query 2022-04-18 11:12:45 +08:00
Marcel
e20f6e24c5
Update sea-query dependency to 0.24.0 (#673)
* Use sea-query 0.24.0

* window: None

* window: None

* window: None
2022-04-18 11:04:30 +08:00
Billy Chan
738f73c4bc
Fix GraphQL example build errors 2022-04-11 11:05:10 +08:00
Chris Tsang
0c96e13325
Merge pull request #667 from fairingrey/cleanup
Fix lints and warnings
2022-04-10 16:45:55 +08:00
Allen
bdd9133aa6 fix lints and warnings
also clean up impl_into_active_value macro
2022-04-09 16:52:47 -07:00
Billy Chan
904700cf56
Update examples 2022-04-06 19:39:42 +08:00
Billy Chan
40c4756fdb
Tonic example fixup 2022-04-06 11:53:54 +08:00
Chris Tsang
ac1071a778 Readme 2022-04-05 21:25:58 +08:00
Chris Tsang
31edb2c409 Rename 2022-04-05 21:23:55 +08:00
Giri Priyadarshan
17a3ad9620
tonic gRPC example (#659)
* tonic gRPC example

* minor change to client output

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2022-04-05 20:35:33 +08:00
Chris Tsang
6175166c79 Add jsonrpsee to example list 2022-04-03 22:16:05 +08:00
Chris Tsang
a59b7aeae2 Tweaks 2022-04-03 22:12:49 +08:00
Chris Tsang
311a14a470 Rename example 2022-04-03 22:12:48 +08:00
Cobalt
6a22207944
chore: Upgrade to Actix Web 4 (#638)
* chore: Upgrade to actix-web 4

* fix: Update example names for CI tests
2022-04-02 22:00:49 +08:00
niuhuan
d547e107bc
Add pansy to COMMUNITY.md (#636) 2022-03-28 14:31:24 +08:00
Chris Tsang
2cf0deeb2c sea-orm-cli 0.7.2 2022-03-27 20:51:10 +08:00
Billy Chan
2d5967df08
Update CLI migrate init template 2022-03-27 17:43:02 +08:00