Ariel Mashraki
c868f4a174
doc: add entsql.WithComments annotation ( #3192 )
2022-12-26 16:56:49 +02:00
Ariel Mashraki
136807549d
dialect/entsql: supports setting SQL column comments ( #3191 )
...
* feat: Add column comment in SQL DDL, using EntSQL annotations to achieve it.
* Update annotation.go
* fix lint
* Add table primary key column comment
* entsql.Comment(string) is unnecessary
* entc/gen: minor changes to entsql.WithComments + add tests
Co-authored-by: chenghonour <wantto@outlook.com >
2022-12-26 14:48:37 +02:00
Ariel Mashraki
891fc8fecf
dialect/sql/schema: support setting default value expressions on id fields ( #3089 )
2022-11-13 18:55:04 +02:00
Ariel Mashraki
25021635a0
doc/fields: document default values using annotations
2022-11-12 14:38:33 +02:00
Ariel Mashraki
1e5f68646f
dialect/sql/entsql: support setting expression as column default value
...
Fixed https://github.com/ent/ent/issues/3069
2022-11-12 14:38:33 +02:00
Ariel Mashraki
3b5a535801
dialect/sql/schema: allow setting JSON default values on pg, sqlite and maria ( #3081 )
2022-11-11 07:41:21 +02:00
Ariel Mashraki
eae7d390a9
dialect/sql: add support for index operator-class using atlasgo.io ( #3073 )
2022-11-08 14:08:10 +02:00
Ariel Mashraki
e93e96ed1b
dialect/sql/schema: use serial underlying types for fks ( #2963 )
2022-09-27 07:54:07 +03:00
Ariel Mashraki
3fc4ba6f15
dialect/entsql: add support for partial indexes ( #2944 )
2022-09-20 15:07:28 +03:00
Ariel Mashraki
cfb038810d
dialect/sql/entsql: support including non-key columns in postgres indexes ( #2912 )
2022-09-07 22:09:48 +03:00
Ariel Mashraki
98d00a35b5
go: update atlas and test global-unique-id migration ( #2661 )
2022-06-18 21:50:44 +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
04e0dc936b
entc/integration/migrate: add example for renaming columns ( #2496 )
2022-04-24 22:36:33 +03:00
Ariel Mashraki
6e4e4da896
entc/integration/migrate: update atlas and test custom time precision ( #2462 )
2022-04-08 11:27:30 +03:00
Ariel Mashraki
317594ec80
dialect/sql/schema: prefix sqlite unique indexes with table name ( #2433 )
...
Fixed https://github.com/ent/ent/issues/2421
2022-03-28 12:54:39 +03:00
Ariel Mashraki
3f0b0856fd
entc/integration: additional schema changes for migration ( #2403 )
2022-03-15 18:32:38 +02:00
Ariel Mashraki
3aab4d91c2
all: update atlasgo.io to latest ( #2376 )
2022-03-04 22:53:37 +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
Ariel Mashraki
51663407cf
dialect/sql/schema: support DESC indexes using atlasgo.io
2022-01-31 15:18:09 +02:00
Ariel Mashraki
898991ac79
entc/gen: set foreign-key columns non-nullable for required edges ( #1703 )
...
Note, this only applies to edges without circular references.
Fixed #1688 and #1374
2022-01-23 22:23:37 +02:00
Ariel Mashraki
60e03285d0
dialect/sql/schema: hello ariga.io/atlas ( #2279 )
2022-01-20 17:20:50 +02:00
Ariel Mashraki
42a2c67cc4
dialect/entsql: add support for table checks in schema/migration
2021-06-17 23:22:37 +03:00
Ariel Mashraki
66871c9806
dialect/sql/schema: add support for index prefixes in mysql
2021-06-09 22:52:31 +03:00
Ariel Mashraki
f3f03e1edd
schema/edge: add support for configuring foreign-key symbols
...
Fixed #1423
2021-04-04 15:27:57 +03:00
Ariel Mashraki
745afde770
dialect/entsql: add support for column default using annotation
...
Fixed #1033
2021-04-03 21:53:56 +03:00
Ariel Mashraki
dd4792f5b3
go: rename module from github.com/facebook/ent => entgo.io/ent ( #1226 )
2021-02-02 23:03:04 +02:00
Ariel Mashraki
6716581ab4
entc/gen: handle default funcs in runtime tempalte ( #1102 )
2020-12-30 13:05:03 +02:00
Ariel Mashraki
93e6a6cebd
dialect/sql/schema: minor style changes ( #1088 )
2020-12-27 20:12:55 +02:00
Ciaran Liedeman
7320b0d16c
dialect/sql/schema: add pg user defined type for schema introspect ( #994 )
...
* Added user defined fields
* pr feedback
* added integration test
* run generate
* Update dialect/sql/schema/postgres_test.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* Update dialect/sql/schema/postgres_test.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* Update dialect/sql/schema/postgres_test.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* Update dialect/sql/schema/postgres_test.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* Update dialect/sql/schema/postgres_test.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* Update dialect/sql/schema/postgres_test.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* Update dialect/sql/schema/postgres_test.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* Update dialect/sql/schema/postgres_test.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* Update dialect/sql/schema/postgres_test.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* Update dialect/sql/schema/postgres_test.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* Update dialect/sql/schema/postgres_test.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* Update dialect/sql/schema/postgres_test.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* Update dialect/sql/schema/postgres_test.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* Update dialect/sql/schema/postgres_test.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* Update dialect/sql/schema/postgres_test.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* Update dialect/sql/schema/postgres_test.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
2020-12-27 20:00:47 +02:00
Ariel Mashraki
013c185b4a
entc/integ: minor style changes in integration ( #978 )
2020-11-24 19:47:24 +02:00
Ciaran Liedeman
bbd41dbc87
dialect/sql/schema: integer to string ( #954 )
...
* Allow migrations from integer to string with max length
* switched to entsql.Annotation
* removed manual conversion size checks
* fixed unit tests
2020-11-24 18:09:40 +02:00
Ciaran Liedeman
e26d81d9a5
dialect/sql/schema: allow migrations from integer to string without size limit ( #952 )
...
* Allow migrations from integer to string without size limit
* Update entc/integration/migrate/entv1/schema/user.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* run generate
* Update entc/integration/migrate/entv2/schema/user.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
2020-11-16 11:44:04 +02:00
Ariel Mashraki
2128d0baee
dialect/sql/schema: apply size-check only if it is defined in schema ( #855 )
2020-10-15 14:17:32 +03:00
Ariel Mashraki
13b379d07c
dialect/sql/schema: properly handle indexes of tables with uncountable name ( #828 )
2020-10-08 23:24:54 +03:00
Ariel Mashraki
fd0a7f9f02
all: facebookincubator/ent => facebook/ent ( #660 )
...
ent repository is going to be migrated to facebook organization
2020-08-18 11:05:08 +03:00
Ariel Mashraki
16d98d1acc
dialect/sql/schema: accept default values for enum fields ( #646 )
...
Fixed #644
2020-07-28 12:55:02 +03:00
Ariel Mashraki
cedeef653a
dialect/sql/schema: accept convert from string2enum and enum2stirng ( #587 )
2020-07-05 22:22:50 +03:00
Ariel Mashraki
c5503d76ad
entc/integration: fix issue with storage-key and inverse-edges ( #556 )
2020-06-17 18:17:09 +03:00
Ariel Mashraki
47f1a203aa
schema/edge: an storage-key option for edges ( #545 )
...
* schema/edge: an storage-key option for edges
* schema/edge: use Column(s) with functional options
2020-06-15 23:06:00 +03:00
Ariel Mashraki
26440c2bc9
dialect/sql/schema: setrange on custom column name of pks ( #333 )
2020-02-09 09:41:26 +02:00
Ariel Mashraki
b4255998bf
entc/gen: change name format for edge fks ( #286 )
...
* entc/gen: change name format for edge fks
* dialect/sql/schema: add fixture support for mysql and postgres
* sql/dialect: merge fkcolumn queries to one for the 2 dialects
2020-02-03 15:41:55 +02:00
Ariel Mashraki
59f172f06a
entc/integration/migrate: add integration tests for migrate
2020-01-01 19:12:11 +02:00
Ariel Mashraki
6bb834612c
dialect/sql/schema: drop unique constraint on pg migration
...
Fixes #235
2019-12-15 18:52:05 +02:00
Ariel Mashraki
38fcf995d0
entc/integration/migrate: enable postgres 10,11 in migrate test
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/132
Reviewed By: alexsn
Differential Revision: D18203398
fbshipit-source-id: a261ed3934d2e4262d7177b41546b2239e798ef5
2019-10-29 10:16:50 -07:00
Ariel Mashraki
1ebfa489c5
ent: add support for enum types
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/45
Reviewed By: alexsn
Differential Revision: D17715085
fbshipit-source-id: 7472e1bd9cf7a8a5bd98f96e6e884c0e27f36803
2019-10-02 12:55:28 -07:00
Ariel Mashraki
624ecd2cc7
schema/field: add storage-key option
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/35
Reviewed By: alexsn
Differential Revision: D17394930
fbshipit-source-id: bc9d8cc6569ad457b93d47d26d143f2442f98df9
2019-09-16 04:39:17 -07:00
Ariel Mashraki
7dfe3c174c
sql/schema: more precise blob definition
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/29
Reviewed By: alexsn
Differential Revision: D17284406
fbshipit-source-id: 84c2ffb50b8f016ad361f1420c5352c7969cbc77
2019-09-10 12:40:37 -07:00
Alex Snast
b71ee6820b
ent/schema: remove string field charset / collation settings
...
Summary: don't expose starage specific features in ent schema
Reviewed By: a8m
Differential Revision: D17111724
fbshipit-source-id: fca9e624b272c0db3fed14c511fa6cb07816a100
2019-08-29 07:38:39 -07:00
Alex Snast
4c1f28d58f
ent/schema: allow setting collation for string fields
...
Reviewed By: a8m
Differential Revision: D17090481
fbshipit-source-id: a08768c9bac4318a91bc6a067c85d6eb022c3024
2019-08-28 04:52:32 -07:00