-
Notifications
You must be signed in to change notification settings - Fork 42
Patch migration to dedupe and merge picklists #7454
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
Open
acwhite211
wants to merge
14
commits into
main
Choose a base branch
from
issue-3970
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+84
−5
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Updated field names to match database schema and improved comments for clarity.
Member
Author
|
@grantfitzsimmons Can you see if this PR removes enough of the problematic picklist duplicates? Just want to make sure before progressing to further testing. |
Added import for Count to facilitate deduplication.
Triggered by 7e5adb0 on branch refs/heads/issue-3970
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #3970
Create a patch migration to de-duplicate and merge picklists. Before deleting duplicates, merge the picklist items into one of the picklists to make sure no items are missing. This is to resolve duplicate picklists that were created in Specify 6.
For the purposes of this PR, we have decided that two picklists are considered duplicates if they are identical on all the following fields:
Unfortunately, picklists are only differentiated by name in the schema and workbench. Also, there might be cases where two picklists have the same name, but have different types/tables/etc. Those would be special cases that would be difficult to categorize as duplicates or not, depending on the user's intent. This PR focuses I identifying, deduplicating, and merging picklists that are certain to be duplicates based on those four fields.
Might want to also add this patch migration to the key migrations command.
When merging together picklistitems from a group of duplicate picklists, the following fields are compared:
Checklist
self-explanatory (or properly documented)
Testing instructions