Ariel Mashraki
55c48a7ef8
dialect/sql/schema: minor style change ( #557 )
2020-06-17 23:12:03 +03:00
Ariel Mashraki
d26fbaeb54
dialect/postgres: fix postgres naming prefix and detection for indexes ( #543 )
2020-06-10 22:24:16 +03:00
Christoph Hartmann
e03e387988
dialect/sql/schema: handle sql json type for schema OfflineMigration ( #542 )
...
Signed-off-by: Christoph Hartmann <chris@lollyrock.com >
2020-06-10 15:41:37 +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
Ariel Mashraki
997a060043
dialect/sql/schemma: fail if column type is invalid ( #486 )
2020-05-11 14:20:35 +03:00
Ciaran Liedeman
f59abad425
fix: checks for error after rows.Next call ( #480 )
2020-05-09 16:23:47 +03:00
Ariel Mashraki
7a0b530b89
dialect/sql/schema: fix sqlite indexes matching ( #471 )
2020-05-07 10:05:17 +03:00
Ariel Mashraki
bcb579106a
dialect/sql/schema: revert #463 for int type ( #470 )
2020-05-07 08:23:10 +03:00
Ariel Mashraki
f384701c04
dialect/sql/schemma: ignore pgtime default value on scanning ( #468 )
2020-05-06 22:34:01 +03:00
Ariel Mashraki
196a764691
dialect/sql/schema: use the postgres column type if exists ( #466 )
2020-05-06 21:54:21 +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
8effe6dfeb
dialect/sql/schema: remove code-duplication from sqlite test ( #425 )
2020-04-07 11:03:44 +03:00
Ariel Mashraki
6824259b80
dialect/sql/schema: remove code-duplication from pg test ( #422 )
2020-04-06 15:44:21 +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
b1eb999097
dialect/sql/schema: comment changes ( #415 )
2020-03-31 22:51:50 +03:00
Ariel Mashraki
a6e5124d13
dialect/sql/schema: better error message for sqlite limitation ( #401 )
2020-03-22 22:04:00 +02:00
Ariel Mashraki
320b9caf61
dialect/sql/schema: add option to skip fixture when it's irrelevant ( #350 )
2020-02-16 18:17:58 +02: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
Ariel Mashraki
7fc3689027
dialect/sql/schema: add prepare option to mysql dialect
2020-01-01 19:11:20 +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
58486009c2
dialect/sql/schema: keep the original name of pg index
2019-12-15 16:47:46 +02:00
Ariel Mashraki
25fe5b8f4a
dialect/sql/schema: correctly check pg unique constraint
2019-12-15 16:41:28 +02:00
Ariel Mashraki
a5e4a9cf54
dialect/sqlscan: add ScanInt64 to be used by sqlgraph
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/213
Reviewed By: alexsn
Differential Revision: D18763694
fbshipit-source-id: 890b35fcc2a28914b276ce65477788b4ddaeebf9
2019-12-03 01:44:48 -08:00
Ariel Mashraki
f98dbbc440
dialect/sql/schema: remove Go 1.13 string features
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/207
Reviewed By: xjtian
Differential Revision: D18743529
fbshipit-source-id: f6420e9ca233e0ce6f9254b4f85d1711ee4d4bfa
2019-11-28 03:16:55 -08: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
e54373f410
ent: allow non-numeric columns as PKs
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/180
Reviewed By: alexsn
Differential Revision: D18636443
fbshipit-source-id: f14b34926817f6d9652f49a640bfb377f3f3cdaf
2019-11-21 08:49:58 -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
f7dac21972
dialect/sql/schema: sqlite support for uuid type
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/177
Reviewed By: alexsn
Differential Revision: D18615595
fbshipit-source-id: b3167a0aa9260cdf22d88dd7e45c7ebfae1909d5
2019-11-20 09:49:55 -08:00
Ariel Mashraki
db7b05ad04
dialect/sql/schema: postgres support for uuid type
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/178
Reviewed By: alexsn
Differential Revision: D18615561
fbshipit-source-id: 8244189186bf35d78cfdb991ee4f8cecd6411cee
2019-11-20 09:49:54 -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
Ariel Mashraki
ea479ea527
dialect/sql/schema: move SQLite logic to its own file
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/129
Reviewed By: alexsn
Differential Revision: D18164329
fbshipit-source-id: 79abfc76389fcf7fe1b88f2dd6e69600ab7f3af2
2019-10-27 08:59:08 -07:00
Ariel Mashraki
23cbf325c0
dialect/sql/schema: move MySQL logic to its own file
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/128
Reviewed By: alexsn
Differential Revision: D18164283
fbshipit-source-id: da6b4d6df89ae4172d8f47a7790c4dac3a8ffe93
2019-10-27 08:59:08 -07:00
Ariel Mashraki
d5c111b35a
dialect/sql/schema: univerdal id support for postgres
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/122
Reviewed By: alexsn
Differential Revision: D18113754
fbshipit-source-id: 1050f0c2b823db6ba1bc37c36f6749cfcffa982d
2019-10-24 08:45:09 -07:00
Ariel Mashraki
7f598f34a2
dialect/sql/schema: fix constraint symbol size for postgres
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/121
Reviewed By: alexsn
Differential Revision: D18113304
fbshipit-source-id: 80d4c65323eb2613fbb9ab47754b1e70b42b1b15
2019-10-24 08:45:09 -07:00
Ariel Mashraki
88bfbc38df
dialect/sql/schema: index builders per dialect
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/118
Reviewed By: alexsn
Differential Revision: D18092371
fbshipit-source-id: 02b85724b1e00d10c930112b9e2c8d07c8727216
2019-10-24 02:23:33 -07:00
Ariel Mashraki
c414cd9a82
dialect/sql/schema: alter column for postgres
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/117
Reviewed By: alexsn
Differential Revision: D18083914
fbshipit-source-id: a5f6993cfe9a260a84c0d4ab868e3e797b3a5776
2019-10-23 05:39:17 -07:00
Ariel Mashraki
a0c7ee77dc
dialect/sql/schema: default value format support for postgres
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/116
Reviewed By: alexsn
Differential Revision: D18083400
fbshipit-source-id: 5939aa2d1819d991ae74adc81c4ac60455bb7ed0
2019-10-23 05:39:16 -07:00
Ariel Mashraki
2789257849
dialect/sql/schema: alter table for postgres
...
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/115
Reviewed By: alexsn
Differential Revision: D18065988
fbshipit-source-id: a7d33bbebd63b01659bc5ba562ac85642dcd3d83
2019-10-22 12:55:36 -07:00
Ariel Mashraki
dff3067639
dialect/sql/schema: table creation tests for postgres
...
Reviewed By: alexsn
Differential Revision: D18059272
fbshipit-source-id: f93785378119dfa18be31fdfc969848ea6d9b782
2019-10-22 08:17:05 -07:00