pgroll icon indicating copy to clipboard operation
pgroll copied to clipboard

Remove constraint addition from OpAlterColumn

Open ryanslade opened this issue 1 year ago • 0 comments

Now that we have OpCreateConstraint we should remove the ability to add constraints via the OpAlterColumn type: https://github.com/xataio/pgroll/blob/51b2641396a551dc611cc0e2a44fa95edfff6011/pkg/migrations/types.go#L89

Having the ability to create constraints in two ways is confusing and the older method of using OpAlterColumn only supports single column constraints.

We should remove the following constraint fields:

  • [ ] Check
  • [ ] References
  • [ ] Unique

ryanslade avatar Dec 13 '24 09:12 ryanslade