Ariel Mashraki
0d0a93b95f
entc/gen: add support for referencing fks to existing fields ( #1289 )
2021-03-01 22:57:32 +02:00
Ariel Mashraki
a0c3976ee5
dialect/sql/schema: add mysql spatial type for migration ( #1271 )
2021-02-24 22:24:42 +02: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
95d780e55e
dialect/sql/schema: add mysql text for column scan ( #1219 )
2021-01-31 22:25:38 +02:00
Ariel Mashraki
3930d3c835
schema/field: implement field.Other ( #1218 )
...
* Implement Other Field
* Implement Other Field
* Changed dialect types
* run generate
* doc typo
* docs added
* schema/field: additional validation and tests for Other type
Co-authored-by: Ciaran Liedeman <ciaran@stackworx.io >
2021-01-31 17:43:28 +02:00
Ariel Mashraki
0ac3526d30
dialect/sql/schema: test postgres inspection
2021-01-18 12:38:39 +02:00
Ariel Mashraki
cc8da8fbf7
dialect/sql/schema: schema match from predicate
2021-01-18 12:38:39 +02:00
Ariel Mashraki
7e904f0e1c
dialect/sql/schema: add sqlite test for inspector ( #1183 )
2021-01-18 11:21:39 +02:00
Ariel Mashraki
8b798d2714
dialect/sql/schema: add tables inspection capabilities ( #1178 )
2021-01-17 16:41:07 +02:00
Ariel Mashraki
91f7e3363a
dialect/sql/schema: support providing alternate schema for postgres ( #1172 )
2021-01-14 16:55:37 +02:00
Ariel Mashraki
601a4ee50d
dialect/sql/schema: support alternate schema for drivers ( #1167 )
2021-01-13 14:21:03 +02:00
Ariel Mashraki
cfb8f5c4a9
dialect/sql/schema: minor style changes ( #1152 )
2021-01-07 20:37:47 +02:00
Ruben de Vries
a9c39bb952
dialect/sql/schema: add migration hooks ( #1150 )
2021-01-07 20:23:01 +02:00
Ariel Mashraki
2aad872da5
dialect/sql/schema: combine binary and varbinary to one clause ( #1140 )
2021-01-06 15:28:26 +02:00
Noah-Jerome Lotzer
d384b3ecc4
dialect/sql/schema: add mysql binary support for native uuid handling in 8.0+ ( #1085 )
2021-01-06 14:47:41 +02:00
Santi Aguilera
75d93200e9
dialect/sql/entsql: allow non incremental primary keys ( #1074 )
...
* Allow non incremental PKs
* Format code with gofmt
* Update entc/integration/config/config_test.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* Update entc/integration/config/config_test.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* Update entc/integration/config/config_test.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* Update entc/integration/config/config_test.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
* Sort imports
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
2020-12-28 17:34:27 +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
7e3d5fdfb5
dialect/sql/schema: add support for json migration in older versions of mariadb ( #1066 )
2020-12-20 11:11:22 +02:00
Nathaniel Peiffer
754e89c6ae
entc/gen: add support for indexing id fields ( #991 )
...
* fix: allow indexes to be created on ID field
* test: add case for id field
* remove extraneous nil check
* change add primary method
* add integration test for mixin id
* go generate
* add default for default
* make linter happy
* invert if statement
* add default index to card integration test
* add index on default id, mixin id, and composite index
* go generate
2020-12-17 17:58:01 +02:00
Ariel Mashraki
86b9d850ee
dialect/sql/mysql: remove enum sorting ( #1021 )
...
* dialect/sql/mysql: remove enum sorting
Enums are not longer created as sorted values
* Update mysql_test.go
2020-12-07 14:07:13 +02:00
Ariel Mashraki
ed4a8fe010
dialect/sql/schema: replace all unquote for postgres dialect ( #1019 )
2020-12-06 11:49:02 +02:00
Ariel Mashraki
47c0ade6c7
dialect/sql/schema: replace all unquote for mysql dialect ( #1017 )
2020-12-05 22:49:01 +02:00
Ariel Mashraki
b70ba95d7b
dialect/sql/schema: replace table unquote with schema option ( #1016 )
2020-12-05 19:43:17 +02:00
Ariel Mashraki
12b7549768
dialect/sql/schema: support mariadb json fields on migration ( #1011 )
2020-12-03 12:04:00 +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
Ariel Mashraki
3d2feec5e2
dialect/sql/schema: initial support for postgres net-types ( #964 )
2020-11-20 15:30:54 +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
77eaad0df6
dialect/sql/schema: skip default value parsing on pg functions ( #951 )
...
Closes #934
2020-11-15 22:55:52 +02:00
ssoor
d5b69da9e0
dialect/sql/schema: add postgres type 'timestamp without time zone' to the scan column ( #949 )
2020-11-14 19:52:37 +02:00
Daven
534dbbe590
dialect/entsql: add support for table-options in annotation ( #938 )
2020-11-10 20:40:56 +02:00
Ariel Mashraki
762df65f11
dialect/entsql: use annotation in schema builder ( #929 )
2020-11-08 11:26:44 +02:00
Ariel Mashraki
dea48a78ea
entc/gen: merge list of entsql annotation to one ( #928 )
2020-11-08 10:57:31 +02:00
Ariel Mashraki
faa54f5e79
Merge branch 'master' of https://github.com/day-dreams/ent into day-dreams-master
2020-10-21 12:31:11 +03:00
Ariel Mashraki
98aeb19013
entc/internal: add snapshot restore logic ( #862 )
...
Issue #852
2020-10-19 14:51:28 +03: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
kakaxizhang
63421aa9ad
dialect/sql/schema: optimize code and add website documents ( #748 )
2020-10-12 16:08:02 +08:00
Ariel Mashraki
13b379d07c
dialect/sql/schema: properly handle indexes of tables with uncountable name ( #828 )
2020-10-08 23:24:54 +03:00
day-dreams
90c3d50c39
fix: fix comment lint error
2020-09-20 17:02:04 +08:00
day-dreams
1f37dad827
fix: fix comment lint error
2020-09-20 16:56:36 +08:00
day-dreams
4582ed0f2a
dialect/sql/schema: use withForeighKeys() instead of withForeighKeysDisable(), and add unit tests () ( #748 )
2020-09-20 16:49:47 +08:00
Ariel Mashraki
1348df349f
dialect/sql/schema: disable fixture in default migration ( #753 )
2020-09-13 11:13:02 +03:00
day-dreams
54028de04f
dialect/sql/schema: add MigrateOption 'WithForeighKeysDisable' ( #748 )
2020-09-13 01:50:37 +08:00
Ariel Mashraki
ae7ba0b43c
dialect/sql: minor comment fixes ( #687 )
2020-08-23 20:48:56 +03:00
Ariel Mashraki
b18716931d
dialect/sql: change boolean operators wrapping ( #678 )
...
The reason is to parentheses only when it's necessary.
2020-08-20 10:08:31 +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
33e4eb3a52
dialect/sql/schema: change id type of ent_types table to be unsigned ( #612 )
2020-07-16 20:07:37 +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
3e7481c3a0
dialect/sql/schema: ignore mysql default values for type type ( #561 )
2020-06-21 23:16:05 +03:00