Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dialect/sql: without foreign keys option for atlas #2404

Merged
merged 6 commits into from Mar 16, 2022
Merged

Conversation

zeevmoney
Copy link
Contributor

This adds the support for disabling FK when running with Atlas migrations
As I see I will need to add mocks for Atlas SQL calls if I want to add tests. I can do it if needed, or maybe there is another way to add the tests?

@zeevmoney zeevmoney changed the title dialect/sql: without foreign key option for atlas dialect/sql: without foreign keys option for atlas Mar 15, 2022
dialect/sql/schema/atlas.go Outdated Show resolved Hide resolved
dialect/sql/schema/atlas.go Outdated Show resolved Hide resolved
zeevmoney and others added 2 commits March 16, 2022 16:15
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
Copy link
Member

@a8m a8m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @zeevmoney for the contribution!

@a8m a8m merged commit b1abbd3 into ent:master Mar 16, 2022
gitlawr pushed a commit to gitlawr/ent that referenced this pull request Apr 13, 2022
* 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>
gitlawr pushed a commit to seal-io/ent that referenced this pull request Apr 13, 2022
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants