ash_postgres icon indicating copy to clipboard operation
ash_postgres copied to clipboard

raise error if the constraint is created on a field that doesn't exist

Open xantrac opened this issue 8 months ago • 2 comments

Contributor checklist

Leave anything that you believe does not apply unchecked.

  • [x] Bug fixes include regression tests
  • [ ] Chores
  • [ ] Documentation changes
  • [ ] Features include unit/acceptance tests
  • [ ] Refactoring
  • [ ] Update dependencies

xantrac avatar Jun 30 '25 00:06 xantrac

Thanks for the PR! I think this behavior is valuable but would be better placed in a verifier on the data layer extension. This will give errors at compile time instead of when generating migrations. See this verifier for example: https://github.com/ash-project/ash_postgres/blob/main/lib/verifiers/validate_identity_index_names.ex

zachdaniel avatar Jun 30 '25 02:06 zachdaniel

Thanks for the PR! I think this behavior is valuable but would be better placed in a verifier on the data layer extension. This will give errors at compile time instead of when generating migrations. See this verifier for example: https://github.com/ash-project/ash_postgres/blob/main/lib/verifiers/validate_identity_index_names.ex

Sounds good!

xantrac avatar Jun 30 '25 19:06 xantrac