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

Remove Column field from DropConstraint #431

Merged
merged 17 commits into from
Nov 6, 2024

Conversation

ryanslade
Copy link
Collaborator

@ryanslade ryanslade commented Oct 24, 2024

We can look this up from the schema so can remove it from the spec.

This is a breaking change since we remove a field from the schema.

Part of #105

By passing it in we are now able to lookup the column for a constraint
when dropping it.
@ryanslade ryanslade marked this pull request as ready for review October 24, 2024 09:25
@exekias exekias requested a review from a team October 30, 2024 10:04
Copy link
Collaborator

@andrew-farries andrew-farries left a comment

Choose a reason for hiding this comment

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

The changes here are fine.

JSON validation rejects unknown fields so existing drop_constraint operations that include the column field will no longer be valid.

This will require existing migrations to be edited otherwise they won't apply.

@ryanslade
Copy link
Collaborator Author

Do you mean existing migrations that exist within xata?

@andrew-farries
Copy link
Collaborator

Do you mean existing migrations that exist within xata?

Yes, any existing branches that have a drop constraint migration in their history will fail to have their migations replayed when a user creates a new branch.

@ryanslade ryanslade merged commit 999a299 into main Nov 6, 2024
27 checks passed
@ryanslade ryanslade deleted the rs/remove-drop-constraint-column branch November 6, 2024 08:38
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.

3 participants