Commit Graph

1687 Commits

Author SHA1 Message Date
Amit Shani
71020f8d7b doc/website/blog: tidb indentation fix (#2423) 2022-03-24 15:07:38 +02:00
Ariel Mashraki
55ed0508c7 doc: minor impronments to getting-started (#2422) 2022-03-24 12:42:57 +02:00
dependabot[bot]
e20e658cdd build(deps): bump actions/cache from 2.1.7 to 3 (#2420)
Bumps [actions/cache](https://github.com/actions/cache) from 2.1.7 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.7...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-24 10:45:38 +02:00
Ariel Mashraki
edd968490e entc/gen: use join for loading m2m relationship (#2417)
* entc/gen: use join for m2m relationship

* entc/gen: add test for eager-load inverse-m2m
2022-03-21 11:37:54 +02:00
Frédéric G. MARAND
938233b191 doc: update installation in getting-started (#2414)
since Go 1.18 `go get` is no longer the way to download a command for any supported version: updated to use go install instead.
2022-03-20 11:47:06 +02:00
Frédéric G. MARAND
0d9173c0b9 doc: update schema-def to use proper method (#2416)
The exemple incorrectly adds an ignored `User.Index` method, although ent actually needs a `User.Indexes` method as part of `ent.Interface`
2022-03-20 11:46:06 +02:00
Ariel Mashraki
a7c1df2d0a entc/gen: move selectbuilder scan functions to shared struct (#2412) 2022-03-18 07:59:04 +02:00
MasseElch
286eec4b38 all: drop 1.16 support and run CI on 1.17 and 1.18 (#2411) 2022-03-17 17:30:13 +01:00
Rotem Tamir
865ddb8d47 doc/website/blog: small fixes 2022-03-17 14:54:57 +02:00
Amit Shani
683fe8cc3b doc/website/blog: TiDB announcement (#2396) 2022-03-17 14:42:15 +02:00
Zeev Manilovich
b1abbd3d65 dialect/sql/schema: without foreign keys option for atlas (#2404)
* dialect/sql: without foreign key option for atlas

* handle fks in modifytables

* add tests

* tests

* Update dialect/sql/schema/atlas.go

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>

* ct and tests

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2022-03-16 17:27:23 +02:00
Ariel Mashraki
9bb800105d doc/hook: additional example for rejecting op (#2407) 2022-03-16 16:09:04 +02:00
Ariel Mashraki
c071898395 entc/gen: move column default quoting to template (#2406) 2022-03-16 13:41:19 +02:00
Ariel Mashraki
412947d274 dialect/sql: avoid passing bool arguments on bool predicates (#2405) 2022-03-15 22:52:49 +02:00
MasseElch
db1617bb29 dialect/sql/schema: upgrade atlas and disable sum file creation (#2400)
* dialect/sql/schema: upgrade atlas and disable sum file creation

* dialect/sql/schema: linter
2022-03-15 17:40:56 +01:00
Ariel Mashraki
3f0b0856fd entc/integration: additional schema changes for migration (#2403) 2022-03-15 18:32:38 +02:00
MasseElch
41db628df3 doc/website/blog: versioned migrations (#2387)
* doc/md: clarify when feature flag is needed for versioned migrations

* doc/website/blog: introduction

* doc/md: more blog post

* Apply suggestions from code review

Co-authored-by: Hila Kashai <73284641+hilakashai@users.noreply.github.com>

* doc/website/blog: move explanation about versioned migration purpose up

* doc/website/blog: apply CR

* doc/website/blog: reword desription of versioned migrations

* doc/website/blog: typos

* doc/website/blog: last minute changes pre publish

Co-authored-by: Hila Kashai <73284641+hilakashai@users.noreply.github.com>
2022-03-14 14:47:13 +01:00
dependabot[bot]
7328355e17 build(deps): bump github.com/spf13/cobra from 1.3.0 to 1.4.0 (#2386)
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spf13/cobra/compare/v1.3.0...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-14 10:21:43 +02:00
Amit Shani
a27f753bc8 go: upgrade atlas for tidb support (#2394) 2022-03-13 17:08:50 +02:00
MasseElch
2853afc1dc dialect/sql/schema: add method to create a named versioned migration … (#2385)
* dialect/sql/schema: add method to create a named versioned migration file

* doc/md: documentation for named versioned migrations

* entc/gen/template/dialect/sql/feature: add NamedDiff method to create named versioned migration files

* all: go generate

* doc/md: apply CR
2022-03-10 16:40:57 +01:00
allcontributors[bot]
342088fcce docs: add maorlipchuk as a contributor for code (#2381) 2022-03-08 23:32:13 +02:00
Ariel Mashraki
0c7679e571 entc/gen: set Ref and Inverse for edge contains both From and To 2022-03-08 22:28:50 +02:00
Ariel Mashraki
78a0fd9716 schema/field: expose RType.Implements method (#2379)
Also, add both (T) and (*T) methods for RType
2022-03-07 22:33:50 +02:00
allcontributors[bot]
a1a7cd8114 docs: add imhuytq as a contributor for code (#2378)
* 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-03-07 10:19:30 +01:00
Huy TQ
ddddc1d92a dialect/sql/schema: add name to versioned migration files (#2375)
* add name to versioned migration files

* Skip writing migration files if the plan has no changes
2022-03-07 10:18:07 +01:00
Ariel Mashraki
3aab4d91c2 all: update atlasgo.io to latest (#2376) v0.10.1 2022-03-04 22:53:37 +02:00
Ariel Mashraki
35a098fdbb dialect/sql/schema: fix bug in atlas integration when working WithDropIndex/WithDropColumn (#2374)
* dialect/sql/schema: fix no change condition in atlas

* dialect/sql/schema: fix bug in atlas integration when working WithDropIndex/WithDropColumn

Co-authored-by: Zeev Manilovich <zeevmanilovich@gmail.com>
2022-03-03 21:52:44 +02:00
dependabot[bot]
8753baae78 build(deps): bump actions/checkout from 2.4.0 to 3 (#2372)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.4.0...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-03 18:37:58 +02:00
dependabot[bot]
25ebdebcf1 build(deps): bump actions/setup-node from 2.5.1 to 3 (#2365)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.5.1 to 3.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v2.5.1...v3)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-28 21:20:25 +02:00
MasseElch
8f213a4d4f doc/website/blog: ogent is using main instead of master (#2367) 2022-02-28 09:34:24 +01:00
Jeffrey Stiles
4213c72699 entc/integration: add required json1 build tag to contributing instructions (#2359)
Co-authored-by: Jeffrey Stiles <freb@users.noreply.github.com>
2022-02-25 09:12:20 +02:00
MasseElch
b17aa2245f doc/md: prettier URL for versioned migrations doc part 2 (#2361) 2022-02-24 08:30:46 +01:00
MasseElch
5ff2256e10 doc/md: prettier URL for versioned migrations doc (#2360) 2022-02-24 08:18:24 +01:00
Ariel Mashraki
feac4d8536 doc/indexes: add annotations supported by atlasgo.io 2022-02-22 16:55:07 +02:00
Ariel Mashraki
36a1063c7e entc/integration/migrate: add FULLTEXT usage example 2022-02-22 16:24:30 +02:00
Ariel Mashraki
fe2511fc8d dialect/entsql: add support for index-type annotation 2022-02-22 16:24:30 +02:00
MasseElch
d80f7cc41a entc/gen: singularize feature flag name for versioned migrations (#2350) 2022-02-21 20:06:32 +01:00
MasseElch
d53b271917 doc/md: fix typos in versioned migrations (#2349) 2022-02-21 19:30:44 +01:00
Pedro Henrique
4949991ca6 doc/website: change footer title color (#2348) 2022-02-21 19:13:02 +02:00
MasseElch
59c6702e12 doc/md: versioned migrations (#2345)
* doc/md: versioned migrations

* doc/md: move to own page

* doc/md: add example for migrations from graph

* doc/md: add image

* Apply suggestions from code review

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>

* doc/md: format examples

* doc/md: mention versioned migrations in offline migration

* doc/md: add instructions how to run a main.go file

* doc/md: add instructions how to move from auto migrate to versioned migration

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2022-02-21 17:56:02 +01:00
MasseElch
0239daca7b dialect/sql/schema: versioned migrations (#2337)
* dialect/sql/schema: fix go doc

* all: update atlas

* dialect/sql/schema: diff connected DB and defined schema and write changes to migration file

* dialect/sql/schema: use migration directory and formatter directly instead of a planner

* all: update atlas

* cmd: add command to create a new migration file

* entc/gen: generate main.go with migrate diff example

* all: regenerate

* cmd/internal/base: make linter happy

* all: support Go 1.16 in versioned migrations main.go

* entc/gen: put versioned migrations behind feature flag

* all: regenerate

* cmd/ent: driver-prefixed dsn in migrate diff command

* cmd/internal/base: remove prefix from migrate import

* cmd/internal/base: use cobra.CheckErr

* cmd: remove diff command

* entc/gen/template/dialect/sql/feature: remove generated main.go

* all: rebase on master and go mod tidy

* all: regenerate
2022-02-21 12:15:17 +02:00
allcontributors[bot]
f5a5a6ef0e docs: add tprebs as a contributor for code (#2343)
* 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-02-18 17:09:10 +02:00
Thomas Prebble
ce9641e1ae dialect/sql/schema: support postgres geometric types (#2340) 2022-02-18 17:08:25 +02:00
Ariel Mashraki
1c79730d12 doc: update aggregate example 2022-02-18 17:04:40 +02:00
Rotem Tamir
5bad22e6b4 doc/website/blog: change share image for ogent post (#2342) 2022-02-18 09:48:06 +02:00
Pedro Henrique
24a7e78d49 entc/gen: skip assertion on edges with type Other (#2335) 2022-02-18 00:37:16 +02:00
dependabot[bot]
3acff2a4b8 build(deps): bump github.com/gorilla/websocket from 1.4.2 to 1.5.0 (#2336)
Bumps [github.com/gorilla/websocket](https://github.com/gorilla/websocket) from 1.4.2 to 1.5.0.
- [Release notes](https://github.com/gorilla/websocket/releases)
- [Commits](https://github.com/gorilla/websocket/compare/v1.4.2...v1.5.0)

---
updated-dependencies:
- dependency-name: github.com/gorilla/websocket
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-16 15:44:22 +02:00
allcontributors[bot]
3d05d2e960 docs: add MrParano1d as a contributor for code (#2334)
* 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-02-15 22:32:10 +02:00
MrParano1d
a75e9c5a8f entc/gen: fix missing unique field in query builder template (#2332)
* fix(query): fix missing unique field in query builder template

when a query gets cloned the unique field doesn't get cloned

#2331

* fix(query): added missing go generate ./...

#2331

* fix(query): added missing go generate ./...

#2331
2022-02-15 22:31:05 +02:00
MasseElch
818ce29c78 doc/website/blog: ogent announcement (#2327)
* doc/website/blog:

* doc/website/blog: first draft

* dich/website/blog: add initial draft of post

* doc/website/blog: change title

* doc/website/blog: add diagram

* doc/website/blog: final filename

* doc/website/blog: link to ogen docs

* doc/website/blog: images

* Apply suggestions from code review

Co-authored-by: Hila Kashai <73284641+hilakashai@users.noreply.github.com>

Co-authored-by: Hila Kashai <73284641+hilakashai@users.noreply.github.com>
2022-02-15 12:15:27 +01:00