Skip to content

Conversation

@acwhite211
Copy link
Member

@acwhite211 acwhite211 commented Jan 27, 2026

Fixes #7660

Update create_cogtype_picklist to use update_or_create with collection and name as the lookup, aligning with the Picklist uniqueness rule. This prevents duplicate insert attempts when a COGTypes picklist already exists with differing attributes and makes the run_key_migrations command fail.

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

Testing instructions

  • Startup Specify with the invertebradosmnrj_2026_01_18 database.
  • Run the key migrations command and see that no errors related to uniqueness rules or Picklists occur.
  • Test the run_key_migration command on other databases.
image

@acwhite211 acwhite211 marked this pull request as ready for review January 27, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 📋Back Log

Development

Successfully merging this pull request may close these issues.

run_key_migrations not creating necessary resources

2 participants