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

Improve logic to include originalUniqueKey in sharedUniqueKeys #1453

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Sep 20, 2024

  1. Improve logic to include originalUniqueKey in sharedUniqueKeys

    Until now, when building the list of SharedUniqueKeys, the code was selecting only the originalUniqueKeys that existed in ghostUniqueKeys list.
    
    However, as part of the alter table, it is possible to add more unique keys or even composed primary keys with multiple columns.
    
    The new logic keeps the old behaviour (it matches originalUniqueKey with exactly the same ghostUniqueKey) but also supports the cases where the originalUniqueKey is now a subset of one of the new ghostUniqueKeys.
    
    If such a case happens, we can still use the originalUniqueKey as normal because a new ghostUniqueKey with the columns of originalUniqueKey plus some new columns is inherently unique just by the columns in the originalUniqueKey, no matter the value in the new columns of the new unique key.
    htmsousa committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    ed6edd8 View commit details
    Browse the repository at this point in the history