Steps After Adding a New Institutional Scoping Level in Specify 7
Last updated 2024-12-09
After adding a new institutional scoping level (collection, discipline, division) to a Specify 7 database, follow these steps:
WARNING: Before following any of these steps, make sure to take a complete backup of any production database.
Collection
WIP
Discipline
Uniqueness Rules
Problem: When a new discipline is added, the uniqueness rules are not automatically applied. This occurs because the migration process that creates the uniqueness rules is not already complete and does not run again.
⚠️ Warning: Make sure to note any custom uniqueness rules. If any do not match the system’s defaults, carefully back them up and re-add them once these steps are complete.
Solution:
Drop the
uniquenessrule_fields
table.Drop the
uniquenessrule
table.Remove the Django migration records associated with these migrations:
delete from django_migrations where name IN ('0001_initial','0002_default_unique_rules');
Enter the container directly via command line:
docker exec -it specifycloud-example-1 /bin/bash
Inside the Docker
specify7
container, re-run the migrations:ve/bin/python manage.py migrate businessrules 0002_default_unique_rules
Verify that the
uniquenessrule_fields
anduniquenessrule
tables are present. Go to the Schema Config in each discipline and verify that ‘Collection Object’ has a uniqueness rule for catalog number.
Division
WIP
Institution
You may only have one institution per Specify database at this time.