Commit Graph

8 Commits

Author SHA1 Message Date
Jannik Clausen
7017cbc898 dialect/sql/schema: file based type store (#2644)
* dialect/sql/schema: file based type store

This PR adds support for a file based type storage when using versioned migrations. The file called `.ent_types` is written to the migration directory alongside the migration files and will be kept in sync for every migration file generation run.

In order to not break existing code, where the type storage might differ for different deployment, global unique ID mut be enabled by using a new option. This will also be raised as an error to the user when attempting to use versioned migrations and global unique ID.

Documentation will be added to this PR once feedback on the code is gathered.

* apply CR

* fix tests

* change format of types file to exclude it from atlas.sum file

* docs and drift test

* apply CR
2022-06-15 16:10:15 +02:00
MasseElch
12b6659c72 dialect/sql/schema: respect sumfile when present and do not operate on checksum mismatch (#2522) 2022-05-05 10:43:20 +02:00
MasseElch
89dc83887c doc/md: document usage of atlas supported migration tools (#2467)
* doc/md: document usage of atlas supported migration tools

* dialect/sql/schema: fix tests
2022-04-13 12:47:00 +02:00
Zeev Manilovich
b1abbd3d65 dialect/sql/schema: without foreign keys option for atlas (#2404)
* dialect/sql: without foreign key option for atlas

* handle fks in modifytables

* add tests

* tests

* Update dialect/sql/schema/atlas.go

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>

* ct and tests

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2022-03-16 17:27:23 +02:00
MasseElch
db1617bb29 dialect/sql/schema: upgrade atlas and disable sum file creation (#2400)
* dialect/sql/schema: upgrade atlas and disable sum file creation

* dialect/sql/schema: linter
2022-03-15 17:40:56 +01: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
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