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
@acwhite211
Copy link
Member Author

It seems that the schema config changes in the specify 0039 migration weren't added to the run_key_migration steps when the migration was first created. I added the functions to the pipeline, so now the agent fields in Loan and Gift will get created in the schema config.

image

usc.update_paleo_desc, # specify 0033
usc.update_accession_date_fields, # specify 0034
usc.update_loan_and_gift_agent_fields, # specify 0039
usc.update_loan_and_gift_agents, # specify 0039
Copy link
Member

Choose a reason for hiding this comment

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

add components to this as well

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

3 participants