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

Atlas diff fails to detect modified constraint, requires constraint name change #2767

Open
sdemjanenko opened this issue May 10, 2024 · 0 comments

Comments

@sdemjanenko
Copy link

I ran

atlas migrate diff remove_column \
  --dir "file://ent/migrate/migrations" \
  --to "ent://ent/schema" \
  --dev-url "docker://postgres/15/dev?search_path=public"

and no diff was found for a constraint change.

My setup is similar to:

&entsql.Annotation{
	Checks: map[string]string{
		"constraint_name":    "...v1 logic",
	},
},

Changing this to

&entsql.Annotation{
	Checks: map[string]string{
		"constraint_name":    "...v2 logic",
	},
},

To get this working I had to change the constraint name

&entsql.Annotation{
	Checks: map[string]string{
		"constraint_name_v2":    "...v2 logic",
	},
},
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

No branches or pull requests

1 participant