Jannik Clausen
c41d223733
dialect/sql/schema: disable foreign keys before opening a transaction ( #2966 )
...
* dialect/sql/schema: disable foreign keys before opening a transaction
* dialect/sql/schema: disable foreign keys before opening a transaction
* fix tests
* add test for bug
* apply CR
2022-09-28 07:41:49 +02:00
Jannik Clausen
5b67bdab4f
dialect/sql/schema: atlas engine is now default ( #2698 )
...
* atlas engine is default, enabled diff by replay
* Apply suggestions from code review
* docs
* apply CR
2022-07-05 12:29:15 +02:00
Mehmet Yılmaz
4d01a56b8d
dialect/sql/schema: allow adding DEFAULT to columns on migration #1758 ( #2199 )
...
* add feature to SET DEFAULT value when add new default value to a existing column
* refactoring unit tests
* correct misspells
* code review refactors
* refactors
* Update dialect/sql/schema/postgres.go
* Update dialect/sql/schema/postgres.go
* Update dialect/sql/schema/postgres.go
* Update dialect/sql/schema/postgres.go
* Update dialect/sql/schema/postgres.go
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com >
2021-12-20 11:29:07 +02:00
Yoni Davidson
b8149f2768
dialect/schema: support float for mysql on inspection ( #2191 )
...
* dialect/schema: support float for mysql
* add tests
2021-12-07 12:45:46 +02:00
Ariel Mashraki
475e237937
dialect/sql/schema: fix bug when using multiple table CHECK constraints ( #2188 )
...
Fixed https://github.com/ent/ent/issues/2185
2021-12-01 12:00:06 +02:00
Ariel Mashraki
dd6c034c2a
dialect/sql/schema: support mediumtext field in migration
...
Fixed https://github.com/ent/ent/issues/2113
2021-11-07 15:37:06 +02:00
Ariel Mashraki
4c2faf2282
entc/gen: allow spaces in enum fields
2021-09-23 23:23:28 +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
1d661deb50
dialect/sql/schema: add mysql tests for checks annotation
2021-06-18 10:30:07 +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
7428167a14
dialect/sql/schema: add testcase for unsigned decimal types ( #1628 )
2021-06-08 11:22:55 +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
745afde770
dialect/entsql: add support for column default using annotation
...
Fixed #1033
2021-04-03 21:53:56 +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
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
8b798d2714
dialect/sql/schema: add tables inspection capabilities ( #1178 )
2021-01-17 16:41:07 +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
faa54f5e79
Merge branch 'master' of https://github.com/day-dreams/ent into day-dreams-master
2020-10-21 12:31:11 +03:00
kakaxizhang
63421aa9ad
dialect/sql/schema: optimize code and add website documents ( #748 )
2020-10-12 16:08:02 +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
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
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
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
Ariel Mashraki
997a060043
dialect/sql/schemma: fail if column type is invalid ( #486 )
2020-05-11 14:20:35 +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
3c03ed00a8
dialect/sql/schema: more code de-duplication from mysql test ( #421 )
2020-04-06 12:31:54 +03:00
Ariel Mashraki
ff26e5ff7d
dialect/sql/schema: remove code-duplication from mysql test ( #420 )
2020-04-06 12:00:44 +03:00
Ariel Mashraki
ab71992b7c
dialect/sql/mysql: fix verifyrange check for mysql ( #337 )
2020-02-09 16:09:02 +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
7fc3689027
dialect/sql/schema: add prepare option to mysql dialect
2020-01-01 19:11:20 +02:00
Ariel Mashraki
0fc310e600
sql/dialect/schema: ignore foreign-keys in index dropping
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/188
Reviewed By: alexsn
Differential Revision: D18676877
fbshipit-source-id: 0babe457edadfa46dcbc7c7478d4468c48f84361
2019-11-24 05:32:22 -08:00
Ariel Mashraki
703a6dd039
dialect/sql/schema: mysql support for uuid type
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/176
Reviewed By: alexsn
Differential Revision: D18615992
fbshipit-source-id: 2c86a661e8d75165470b9b2d351cb973147290d8
2019-11-20 09:49:55 -08:00
Ariel Mashraki
54b1a2ead9
sql/dialect/schema: accept old blob types in mysql ( #164 )
...
Summary:
Pull Request resolved: https://github.com/facebookincubator/ent/pull/164
support varbinary as blob types
Reviewed By: yhayun
Differential Revision: D18504189
fbshipit-source-id: e3c8fcf412d1f6374b0084b439eee426b24b3466
2019-11-14 06:37:17 -08:00