Commit Graph

70 Commits

Author SHA1 Message Date
Ariel Mashraki
4c2faf2282 entc/gen: allow spaces in enum fields 2021-09-23 23:23:28 +03:00
storyicon
779594f7da dialect/sql/schema: support mysql mediumtext type (#1972)
Signed-off-by: storyicon <yuanchao@bilibili.com>
2021-09-22 15:35:14 +03:00
Ariel Mashraki
38925b6134 dialect/sql/schema: revert #1547 for mariadb 2021-09-14 13:07:49 +03:00
Ariel Mashraki
79716e47d0 dialect/sql/schema: remove unneeded nolint rule 2021-07-16 14:07:40 +03:00
Ruben de Vries
1ea718f7bf dialect/sql/schema: add support for postgres and mysql numeric and decimal types in migrations (#1721)
* improve error message when failing to generate changeset

* support migrations for postgres and mysql numeric fields
2021-07-16 13:57:53 +03:00
Ariel Mashraki
7ffdce4cef sql/schema: support custom char type for field.Other
Fixed #1664
2021-06-29 16:31:57 +03: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
f7db15ccbb dialect/sql/schema: add field collation support for postgres 2021-05-10 20:32:45 +03:00
Mahmudul Haque
ba954ebeec dialect/sql/schema: add field collation support (#1548)
* specific field collation support

* go generate ./...
2021-05-09 18:09:08 +03:00
Ariel Mashraki
37d4b9e2cb dialect/sql/schema: do not set timestamp to nullable columns on MySQLv8.* (#1547)
Fixed #1541
2021-05-08 21:29:35 +03:00
Ariel Mashraki
fd1f2df150 dialect/sql/schema: add support for pg arrays in migration 2021-04-14 14:25:28 +03:00
Ariel Mashraki
a1ad70c685 dialect/sql/schema: json column migration for mariadb10.3.13
See https://github.com/ent/ent/issues/1395\#issuecomment-809420881
Fixed #1395
2021-03-29 22:34:58 +03:00
Ariel Mashraki
305edd00e0 dialect/sql/schema: handle index prefix key limit in older versions of mariadb
Fixed #1378
2021-03-23 17:01:38 +02:00
Matthew Gabeler-Lee
c53b45ddb0 all: use %w instead of %v to wrap errors (#1275)
* all: use %w instead of %v for nested errors with fmt.Errorf

* all: update generated code to use %w instead of %v for error wrapping
2021-03-03 20:05:33 +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
cc8da8fbf7 dialect/sql/schema: schema match from predicate 2021-01-18 12:38:39 +02:00
Ariel Mashraki
8b798d2714 dialect/sql/schema: add tables inspection capabilities (#1178) 2021-01-17 16:41:07 +02:00
Ariel Mashraki
601a4ee50d dialect/sql/schema: support alternate schema for drivers (#1167) 2021-01-13 14:21:03 +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
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
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
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
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
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
3e7481c3a0 dialect/sql/schema: ignore mysql default values for type type (#561) 2020-06-21 23:16:05 +03:00
Ariel Mashraki
cfee55e514 schema/field: add an option to configure the database type (#484) 2020-05-11 15:07:33 +03:00
Alex Snast
68db86be76 avoid multiple rows.Err calls on error path
Signed-off-by: Alex Snast <alexsn@fb.com>
2020-05-11 14:26:40 +03:00
Ciaran Liedeman
f59abad425 fix: checks for error after rows.Next call (#480) 2020-05-09 16:23:47 +03:00
Ariel Mashraki
bcb579106a dialect/sql/schema: revert #463 for int type (#470) 2020-05-07 08:23:10 +03:00
Ariel Mashraki
769a2ed302 dialect/sql/schemma: return the database column type if exists (#463) 2020-05-05 19:32:52 +03:00
Ariel Mashraki
51cdda421f dialect/sql/schema: add optional schema-type to column spec (#461) 2020-05-04 20:16:43 +03:00
Ariel Mashraki
2208b243db dialect/sql/schema: initial work for incremental migration (#428)
This is a WIP PR and should be ignored this moment.
It's based on PR #221 created by Erik Hollensbe (He should
get his credit for his work before we land this).
2020-04-12 19:12:33 +03:00
Ariel Mashraki
b1eb999097 dialect/sql/schema: comment changes (#415) 2020-03-31 22:51:50 +03:00
Ariel Mashraki
ab71992b7c dialect/sql/mysql: fix verifyrange check for mysql (#337) 2020-02-09 16:09:02 +02:00
Ariel Mashraki
26440c2bc9 dialect/sql/schema: setrange on custom column name of pks (#333) 2020-02-09 09:41:26 +02:00
qystishere
374b5dd3b8 dialect/sql/schema: support mysql latest numeric type format (#328) 2020-02-08 15:37:35 +02:00
Ariel Mashraki
c0c0d2ae5c dialect/sql/schema: verify and fix mysql auto-increment on reset (#329) 2020-02-06 19:36:23 +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
6819c01906 dialect/sql: allow nil values for exec commands (#313)
In most cases, the sql.Result is not needed.
2020-01-22 22:43:45 +02:00
Ariel Mashraki
3425754c8e dialect/sql/schema: scan multi-column indexes with their correct position (#308) 2020-01-22 04:43:01 -05:00
Ariel Mashraki
91c163525f dialect/sql/schema: correctly read uint32 type in migration (#289)
Fixes #287
2020-01-15 17:46:16 +02:00