Skip to content

Fix schema override#7701

Merged
acwhite211 merged 5 commits intoissue-2931-2from
issue-7682-2
Feb 16, 2026
Merged

Fix schema override#7701
acwhite211 merged 5 commits intoissue-2931-2from
issue-7682-2

Conversation

@acwhite211
Copy link
Member

@acwhite211 acwhite211 commented Feb 13, 2026

Fixes #7682

This fix addresses two root causes in schema config override application: first, update_schema_config.py now preserves explicit ishidden overrides from config/<discipline>/schema_overrides.json during migration-time hide/unhide passes, including applying the explicit true/false value when rerun, so fields like collectionobjectgroupjoin.text1/text2 in Geology are no longer accidentally re-hidden; second, the Splocaleitemstr write path was changed from effectively insert-only behavior to true upsert behavior keyed by language + FK (itemname/itemdesc/containername/containerdesc), which updates existing caption/description text and removes duplicates instead of leaving stale values like Text1. Finally, run_key_migration_functions.fix_schema_config was updated to reapply schema defaults/overrides across all disciplines, ensuring existing databases get corrected without manual row edits.

Checklist

  • Self-review the PR after opening it to make sure the changes look good and
    self-explanatory (or properly documented)
  • Add relevant issue to release milestone
  • Add pr to documentation list
  • Add automated tests
  • Add a reverse migration if a migration is present in the PR

Testing instructions

  • Startup Specify on a blank database and use the setup tool to create a Geography database.
  • See that the database setup process runs without errors.
  • See the the collectionobjectgroupjoin table has it's field text and descriptions properly set based on the geology schema_overrides file
    "collectionobjectgroupjoin": {
    "items": [
    { "isprimary": { "ishidden": false, "name": "Is Primary", "desc": "Indicates whether a particular collection object within a group is the primary member." } },
    { "issubstrate": { "ishidden": false, "name": "Is Substrate", "desc": "Indicates whether a particular collection object within a group is the substrate that represents the group." } },
    { "precedence": { "ishidden": false, "name": "Precedence", "desc": "Determines the order of group members when displayed." } },
    { "text1": { "ishidden": false, "name": "Proportion", "desc": "Qualitative or quantitative fraction of a whole for part/whole relationships." } },
    { "text2": { "ishidden": false, "name": "Role", "desc": "Role this object plays in the Collection Object Group." } },
    { "childco": { "ishidden": false, "name": "Child Collection Object", "desc": "Represents a collection object member of a group." } },
    { "childcog": { "ishidden": false, "name": "Child Collection Object Group", "desc": "Represents a collection object group member of a group." } }
    ]
    },
image

Copy link
Member

@grantfitzsimmons grantfitzsimmons left a comment

Choose a reason for hiding this comment

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

Strictly UX review:

  • Startup Specify on a blank database and use the setup tool to create a Geography database.

I also added new disciplines to an existing database.

  • See that the database setup process runs without errors.
  • See the the collectionobjectgroupjoin table has it's field text and descriptions properly set based on the geology schema_overrides file
    "collectionobjectgroupjoin": {
    "items": [
    { "isprimary": { "ishidden": false, "name": "Is Primary", "desc": "Indicates whether a particular collection object within a group is the primary member." } },
    { "issubstrate": { "ishidden": false, "name": "Is Substrate", "desc": "Indicates whether a particular collection object within a group is the substrate that represents the group." } },
    { "precedence": { "ishidden": false, "name": "Precedence", "desc": "Determines the order of group members when displayed." } },
    { "text1": { "ishidden": false, "name": "Proportion", "desc": "Qualitative or quantitative fraction of a whole for part/whole relationships." } },
    { "text2": { "ishidden": false, "name": "Role", "desc": "Role this object plays in the Collection Object Group." } },
    { "childco": { "ishidden": false, "name": "Child Collection Object", "desc": "Represents a collection object member of a group." } },
    { "childcog": { "ishidden": false, "name": "Child Collection Object Group", "desc": "Represents a collection object group member of a group." } }
    ]
    },

@acwhite211 acwhite211 merged commit 0c2f257 into issue-2931-2 Feb 16, 2026
14 checks passed
@acwhite211 acwhite211 deleted the issue-7682-2 branch February 16, 2026 23:00
@github-project-automation github-project-automation bot moved this from 📋Back Log to ✅Done in General Tester Board Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants