Jannik Clausen
7017cbc898
dialect/sql/schema: file based type store ( #2644 )
...
* dialect/sql/schema: file based type store
This PR adds support for a file based type storage when using versioned migrations. The file called `.ent_types` is written to the migration directory alongside the migration files and will be kept in sync for every migration file generation run.
In order to not break existing code, where the type storage might differ for different deployment, global unique ID mut be enabled by using a new option. This will also be raised as an error to the user when attempting to use versioned migrations and global unique ID.
Documentation will be added to this PR once feedback on the code is gathered.
* apply CR
* fix tests
* change format of types file to exclude it from atlas.sum file
* docs and drift test
* apply CR
2022-06-15 16:10:15 +02:00
Giau. Tran Minh
195be2d98d
entc/gen: fixed unnamed field initialization ( #2648 )
...
* entc/gen: fixed ConstraintError fields name
* fix: run go generate
* entc/gen: fixed Filter fields name
* fix: run go generate again for entql
2022-06-14 12:32:46 +03:00
Will Bicks
cd1afb235c
entc: improve generated comments for edges and fields ( #2632 )
...
* replace default field comment with user comment if defined
* use comments defined on edges in generated entities
* add docs for comment method on edges and fields
* update integration to reflect above changes
2022-06-13 15:52:47 +03:00
Dor Liberman
1572f1eb14
doc/md: fix NamedValues option in graphql tutorial ( #2535 )
...
* doc/md: fixing NamedValues option in Add Fields To The Schema example
* Update doc/md/tutorial-todo-crud.md
* Update doc/md/tutorial-todo-crud.md
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
2022-06-12 12:12:25 +03:00
Jannik Clausen
bfa9c963cb
dialect/sql/schema: introduce type store interface ( #2636 )
...
This will allow us to store information about pk ranges allocated per type in a different location thant the database. This is useful for deterministic pk range computation for things like generating atlas.hcl out of the Ent schema.
2022-06-10 10:08:33 +02:00
allcontributors[bot]
b2844fb88c
docs: add hax10 as a contributor for code ( #2637 )
...
* docs: update doc/md/contributors.md [skip ci]
* docs: update .all-contributorsrc [skip ci]
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-06-09 20:40:26 +03:00
hax10
e6152856b1
entc/gen: fix name clash in entc template when entity name has initials as tx ( #2633 )
2022-06-09 20:39:46 +03:00
Ariel Mashraki
fd955654a0
entc/gen: change codegen signature from entc to ent ( #2627 )
2022-06-07 17:48:17 +03:00
frederikhors
d9d63b5814
doc/md: use fmt.Errorf instead of errors.Wrapf ( #2608 )
...
* Use fmt.Errorf instead of errors.Wrapf
* Update transactions.md
* Update transactions.md
2022-06-07 10:33:25 +03:00
Sasha Melentyev
9e4660f104
doc: change golang docs links for actual ( #2620 )
2022-06-06 17:55:55 +03:00
Sasha Melentyev
dd4519f935
dialect/entsql: rename annotation vars ( #2614 )
2022-06-06 11:20:56 +03:00
Ariel Mashraki
e634960221
entc/gen: move a8m/entclean logic to ent ( #2612 )
2022-06-05 14:31:45 +03:00
frederikhors
2c3f65b528
doc/website: do not refer to sqlite3 anymore ( #2593 )
2022-06-01 18:55:07 +03:00
Amit Shani
63592f79c4
go: bump atlas to latest master ( #2584 )
2022-06-01 17:13:23 +03:00
Sasha Melentyev
6a166b9e7c
ci: bump golangci-lint version ( #2577 )
2022-06-01 17:11:42 +03:00
Amit Shani
8fe8c748c5
doc/md: add more dialects to quickstart ( #2588 )
...
* doc/md: add more dialects to quickstart
* remove unnecessary spaces
2022-06-01 16:59:08 +03:00
Amit Shani
d071e0c70a
doc/md: fix some broken links ( #2589 )
2022-06-01 16:44:25 +03:00
Ariel Mashraki
5d303d08b5
doc/privacy: add heading for filter rules section
2022-06-01 14:05:51 +03:00
Ariel Mashraki
6120ecfa14
Update README.md
...
Fixed https://github.com/ent/ent/discussions/2585 .
2022-06-01 14:03:53 +03:00
Ariel Mashraki
c26d92d39e
entc/gen: support indexing edge schema with composite primary keys ( #2578 )
2022-05-30 17:20:27 +03:00
Ariel Mashraki
5b81d7d832
dialect/sql/sqlgraph: better support for update nodes with predicates ( #2574 )
2022-05-29 16:23:52 +03:00
Giau. Tran Minh
0917701f91
entc/gen: fix wrong UserDefined checks in templates ( #2572 )
2022-05-28 12:12:57 +03:00
Ariel Mashraki
5800f6b578
entc/gen: avoid setting the incremental attribute fo non-integer fields ( #2571 )
2022-05-27 23:54:41 +03:00
Reiji Tokuda
f1c396a435
go: update sqlite3 driver from 1.14.10 to 1.14.13 ( #2566 )
...
* modify updating sqlite3 driver
go-sqlite3 driver has been changed. a build tag json1 is the default.
* modify ci file for testing current master branch
2022-05-26 17:55:00 +03:00
Ariel Mashraki
f7771e730f
go: update ariga.io/atlas to latest master ( #2567 )
2022-05-26 09:17:31 +03:00
Ariel Mashraki
e1c5277483
ent: initial support for edge schemas ( #2560 )
2022-05-25 15:46:00 +03:00
Giau. Tran Minh
1e05ccc284
entgql: add Nil/NotNil for typed predicates ( #2556 )
...
* feat: add <Type>Func to allow using entgl.FieldNil
* fix: replace Func with Nil/NotNil
2022-05-21 23:31:14 +03:00
Ariel Mashraki
c3c8773908
go: update ariga.io/atlas to latest master ( #2555 )
2022-05-20 08:18:29 +03:00
Ariel Mashraki
f2e0bef7a8
entc/gen: add conditional-write option to external templates ( #2542 )
2022-05-12 07:36:15 +03:00
Jannik Clausen
fc03c8d283
doc/md: add note about versioned migration tool support requiring latest master ( #2537 )
2022-05-10 08:52:09 +02:00
Giau. Tran Minh
d8fdf3b512
doc/md: update GQL tutorial with schema generator ( #2528 )
...
* doc/md: update GQL tutorial
fixed the connections to Non-Null
fixed the name of WithWhereInputs()
* doc/md: initial Schema Generator tutorial
* update the tutorial
* fix: correct the line
* doc/md: apply suggestions from code review
Co-authored-by: Hila Kashai <73284641+hilakashai@users.noreply.github.com >
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* doc/md: add more doc about `entgql.RelayConnection()`
Co-authored-by: Hila Kashai <73284641+hilakashai@users.noreply.github.com >
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
2022-05-09 18:09:21 +03:00
Jannik Clausen
63a2836ef2
doc/website/blog: share image to sum file blog post ( #2534 )
2022-05-09 16:17:06 +02:00
Jannik Clausen
b1ceb0a55a
doc/website/blog: fix document name ( #2533 )
2022-05-09 15:48:44 +02:00
Jannik Clausen
4142108d62
doc/website/blog: external tools and sum file ( #2489 )
...
* doc/website/blog: external tools and sum file
* Apply suggestions from code review
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* doc/website/blog: apply CR
* Apply suggestions from code review
Co-authored-by: Hila Kashai <73284641+hilakashai@users.noreply.github.com >
* doc/website/blog: minor fixes
* doc/website/blog: invoke atlas command by calling go run
* doc/website/blog: It's-a me, Jannik!
* Apply suggestions from code review
Co-authored-by: Rotem Tamir <rotemtamir@gmail.com >
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
Co-authored-by: Hila Kashai <73284641+hilakashai@users.noreply.github.com >
Co-authored-by: Rotem Tamir <rotemtamir@gmail.com >
2022-05-09 15:23:51 +02:00
Ariel Mashraki
91ba0c7cea
doc/website: minor css fixes ( #2532 )
2022-05-09 13:20:45 +03:00
Giau. Tran Minh
429a5e5d91
doc/md: update Discord server invite link ( #2530 )
2022-05-07 08:55:27 +03:00
Pedro Henrique
4d1c0af20d
entc/integration: add examples for sub-queries + minor fixed for selector builder ( #2509 )
...
* dialect/sql: move FROM to inside switch
* dialect/sql: adds simple example of subquery usage
* dialect/sql: adds a more complex example with join
* Apply suggestions from code review
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* dialect/sql: fix missing type and change modify to where
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
2022-05-05 22:46:13 +03:00
Ikko Ashimine
0c75ffc007
doc: add README_jp.md link ( #2527 )
2022-05-05 20:10:06 +03:00
MasseElch
12b6659c72
dialect/sql/schema: respect sumfile when present and do not operate on checksum mismatch ( #2522 )
2022-05-05 10:43:20 +02:00
allcontributors[bot]
2fe8e053c1
docs: add booleangate as a contributor for code ( #2526 )
...
* docs: update doc/md/contributors.md [skip ci]
* docs: update .all-contributorsrc [skip ci]
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-05-05 11:20:50 +03:00
Justin Johnson
38d4d5fb5c
entc/gen: propagate nodes post-save mutations ( #2525 )
...
* Failing test
* Fix propagating entirely models from OpCreate hook
* Apply suggestions from code review
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* whitespace
* Failing test for updateone
* fix for updateone
* Regnerate
* regen from root
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
2022-05-05 11:19:21 +03:00
MasseElch
240a43e7a2
deps: bump atlas (issue with current version of atlas due to an argum… ( #2521 )
...
* deps: bump atlas (issue with current version of atlas due to an argument change in NewDriver)
* ci: do not run integration on master in a PR
* Revert "ci: do not run integration on master in a PR"
This reverts commit 6ba5b8e2d9 .
2022-05-05 08:30:29 +02:00
Amit Shani
4ac82f5bb3
doc/md: tidb tested on v6.0.0 ( #2502 )
...
* doc/md: tidb tested on v6.0.0
* up atlas
2022-05-02 14:30:20 +03:00
MasseElch
51f293fc54
entc/gen/template/sql/feature: add comment to feature field on config… ( #2515 )
...
* entc/gen/template/sql/feature: add comment to feature field on config and remove blank line
* all: go generate
2022-05-02 14:29:53 +03:00
Ariel Mashraki
dab95be855
doc/md: example and test for migration apply hooks ( #2514 )
2022-05-02 14:25:22 +03:00
Ariel Mashraki
2d291df2ec
readme: add discord shield
2022-05-01 17:57:33 +03:00
Pedro Henrique
9d992c4f41
doc/md: document custom graphql where filters ( #2507 )
...
* doc/md: document custom where filters
* Update doc/md/tutorial-todo-gql-filter-input.md
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
2022-04-29 12:49:29 +03:00
MasseElch
e50d335c30
dialect/sql: support string based pk for mysql56 indexes (prevent err… ( #2506 )
...
* dialect/sql: support string based pk for mysql56 indexes (prevent error 1071)
* Update entc/integration/customid/ent/schema/revision.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
2022-04-29 08:57:22 +02:00
MasseElch
4db0c544c2
dialect/sql: add New method to pass in a river without opening a *sql.DB before ( #2504 )
2022-04-28 13:12:34 +02:00
MasseElch
4e434b2b73
gen/template: allow overriding of client struct and initialization ( #2503 )
2022-04-28 09:07:44 +02:00