Repository navigation
use md5 hash for controlled list item value, re #13086 - #13087
Merged
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the hash-based uniqueness change supporting long controlled-list values.
No open issues 🎉
What changed in this PR
This PR addresses #13086 by hashing controlled-list values in the uniqueness index, allowing long text to be stored without exceeding PostgreSQL’s B-tree index size limit.
Changes:
- Replace the indexed value with its MD5 hash while retaining the full stored text.
- Add a migration to update the existing uniqueness constraint.
- Add regression tests for long values, duplicate rejection, and distinct item/type/language combinations, plus a release note.
| File | Description |
|---|---|
tests/extensions/controlled_lists/test_models.py |
Test long-value storage and uniqueness enforcement. |
releases/8.2.0.md |
Document the long controlled-list value fix. |
arches/extensions/controlled_lists/models.py |
Use MD5 in the value uniqueness constraint. |
arches/extensions/controlled_lists/migrations/0013_hash_listitemvalue_unique_constraint.py |
Replace the database constraint with the hash-based index. |
Review effort: Balanced
chiatt
requested changes
Oct 30, 2026
chiatt
left a comment
Member
There was a problem hiding this comment.
Looks good to me if you'll entertain my pickiness regarding the changelog entry.
Co-authored-by: Cyrus Hiatt <chiatt@fargeo.com>
chiatt
approved these changes
Oct 30, 2026
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
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.
Types of changes
Description of Change
Long strings used as controlled list item values raises an OperationError because of limitations with b-tree indexing.
Issues Solved
Closes #13086
Checklist