Skip to content

When a table is deleted on one branch and has its data modified on the other, record this as a schema conflict.#9208

Merged
nicktobey merged 3 commits intomainfrom
nicktobey/schemaconflict2
May 12, 2025
Merged

When a table is deleted on one branch and has its data modified on the other, record this as a schema conflict.#9208
nicktobey merged 3 commits intomainfrom
nicktobey/schemaconflict2

Conversation

@nicktobey
Copy link
Contributor

@nicktobey nicktobey commented May 12, 2025

Currently, attempting to merge when a table has been drop on one branch and had its data modified on the other produces an immediate error that aborts the merge. This error does not necessarily have enough context to determine the affected table, which makes resolving the merge difficult.

Given that we already handle a simultaneous drop + schema modification (by treating it as a schema conflict), we should be able to handle the simpler case of data modifications as well.

Since dropping a table is technically a schema change, this should now get reported as a schema conflict, and pause the merge, allowing the user to query dolt_schema_conflicts for more information.

After this PR, conflicts involving a dropped table will present the same as other schema conflicts: the user still won't be able to use dolt conflicts resolve to resolve them because of #6616, but the user can query dolt_schema_conflicts to see the cause of the conflict.

@coffeegoddd
Copy link
Contributor

@nicktobey DOLT

comparing_percentages
100.000000 to 100.000000
version result total
6ce5905 ok 5937457
version total_tests
6ce5905 5937457
correctness_percentage
100.0

@nicktobey nicktobey merged commit 15c256d into main May 12, 2025
21 of 22 checks passed
@tbantle22 tbantle22 deleted the nicktobey/schemaconflict2 branch May 28, 2025 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants