Skip to content

Remove key migration functions not in v7.11 #6997

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 11 commits into
base: issue-6266
Choose a base branch
from

Conversation

acwhite211
Copy link
Member

@acwhite211 acwhite211 commented Jul 9, 2025

Temporary state for running the key migration functions while being compatible with the v7.11.0 branch. This branch should just be used for running the key migration function. Once that command runs, return to using the v7.11.0 release for using the Specify 7 app. This branch removes the migrations that were added in the main branch and make schema changes.

docker exec -it specify7-specify7-1 ve/bin/python manage.py run_key_migration_functions

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

@acwhite211
Copy link
Member Author

@specify/developers This branch should just be used for running the key migration function for clients on the v7.11.0 release. Once that command runs, return to using the v7.11.0 release for using the Specify 7 app. This branch removes the migrations that were added in the main branch and makes schema changes.

docker exec -it specify7-specify7-1 ve/bin/python manage.py run_key_migration_functions

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.

This is still based on main essentially, so when I was adding collections and wanted to run the command, it automatically runs migrations not yet included in v7.11.0.2, see:

2025-07-16 23:36:41 Operations to perform:
2025-07-16 23:36:41   Apply all migrations: accounts, attachment_gw, auth, businessrules, contenttypes, notifications, patches, permissions, sessions, specify, workbench
2025-07-16 23:36:41 Running migrations:
2025-07-16 23:36:41   Applying patches.0004_add_title_tree_rank_fix... OK
2025-07-16 23:36:41   Applying patches.0005_chrono_start_end... OK
2025-07-16 23:36:55   Applying patches.0006_version_fix... OK
2025-07-16 23:36:57   Applying specify.0032_add_quantities_gift... OK

and so on. To make this useful for this purpose, it needs to only include migrations present on v7.11.0.2 (or the latest tagged release at the time).

@github-project-automation github-project-automation bot moved this from 📋Back Log to Dev Attention Needed in General Tester Board Jul 17, 2025
@acwhite211
Copy link
Member Author

@grantfitzsimmons This PR is not based on v7.11. It's this PR that you should be using #6970

@grantfitzsimmons
Copy link
Member

@acwhite211 This is the current description of the PR:

Temporary state for running the key migration functions while being compatible with the v7.11.0 branch. This branch should just be used for running the key migration function. Once that command runs, return to using the v7.11.0 release for using the Specify 7 app. This branch removes the migrations that were added in the main branch and make schema changes.

This seems inaccurate then?

@acwhite211
Copy link
Member Author

Sorry, this is the correct PR to use on v7.11. I kept in useful migrations that didn't add/remove any fields, because I thought that would help save cleanup work, like migrations files in the patches app, but I can remove those from the PR if needed.

@grantfitzsimmons
Copy link
Member

grantfitzsimmons commented Jul 17, 2025

Thanks for all your help, @acwhite211! I will test again once you request my review 😄

@acwhite211
Copy link
Member Author

Removed the unwanted patches migrations. Let me know if any other changes will help.

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.

Using a new copy of the calvertmarinemuseum database.

Running this with a new v7.11.0.2 database, I still get one new migration that didn't exist before in v7:

specify7       |   Applying specify.0032_add_quantities_gift... OK
specify7       | Watching for file changes with StatReloader

After running the command:
ve/bin/python manage.py run_key_migration_functions

I got a verbose output, logging all the audit log records it creates, but not very clearly what is going on. That's OK, assuming it all works, but it would be good to see what changes are being made to user permissions if possible instead.

The last few rows of the output looked like this:

[17/Jul/2025 11:00:46] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <RolePolicy: RolePolicy object (1183)>, None, None]
[17/Jul/2025 11:00:46] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <RolePolicy: RolePolicy object (1184)>, None, None]
[17/Jul/2025 11:00:46] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <RolePolicy: RolePolicy object (1185)>, None, None]
[17/Jul/2025 11:00:46] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <RolePolicy: RolePolicy object (1186)>, None, None]
[17/Jul/2025 11:00:46] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <RolePolicy: RolePolicy object (1187)>, None, None]
[17/Jul/2025 11:00:46] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserPolicy: (196609, 2, '/system/sp7/collection', 'access')>, None, None]
[17/Jul/2025 11:00:46] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserPolicy: (229377, 2, '/system/sp7/collection', 'access')>, None, None]
[17/Jul/2025 11:00:46] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (88)>, None, None]
[17/Jul/2025 11:00:46] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (89)>, None, None]
[17/Jul/2025 11:00:46] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (90)>, None, None]
[17/Jul/2025 11:00:46] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (91)>, None, None]
[17/Jul/2025 11:00:46] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (92)>, None, None]
[17/Jul/2025 11:00:46] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (93)>, None, None]
[17/Jul/2025 11:00:46] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (94)>, None, None]
[17/Jul/2025 11:00:46] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (95)>, None, None]
[17/Jul/2025 11:00:46] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (96)>, None, None]
[17/Jul/2025 11:00:46] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (97)>, None, None]
[17/Jul/2025 11:00:46] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (98)>, None, None]
[17/Jul/2025 11:00:46] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (99)>, None, None]
[17/Jul/2025 11:00:46] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (100)>, None, None]
[17/Jul/2025 11:00:46] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (101)>, None, None]
[17/Jul/2025 11:00:46] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserPolicy: (163841, 10, '/system/sp7/collection', 'access')>, None, None]
[17/Jul/2025 11:00:46] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserPolicy: (98305, 10, '/system/sp7/collection', 'access')>, None, None]
[17/Jul/2025 11:00:47] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserPolicy: (65537, 10, '/system/sp7/collection', 'access')>, None, None]
[17/Jul/2025 11:00:47] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserPolicy: (32769, 10, '/system/sp7/collection', 'access')>, None, None]
[17/Jul/2025 11:00:47] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (102)>, None, None]
[17/Jul/2025 11:00:47] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (103)>, None, None]
[17/Jul/2025 11:00:47] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (104)>, None, None]
[17/Jul/2025 11:00:47] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (105)>, None, None]
[17/Jul/2025 11:00:47] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (106)>, None, None]
[17/Jul/2025 11:00:47] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (107)>, None, None]
[17/Jul/2025 11:00:47] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (108)>, None, None]
[17/Jul/2025 11:00:47] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (109)>, None, None]
[17/Jul/2025 11:00:47] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (110)>, None, None]
[17/Jul/2025 11:00:47] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (111)>, None, None]
[17/Jul/2025 11:00:47] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (112)>, None, None]
[17/Jul/2025 11:00:47] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (113)>, None, None]
[17/Jul/2025 11:00:47] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <UserRole: UserRole object (114)>, None, None]
[17/Jul/2025 11:00:47] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <LibraryRolePolicy: LibraryRolePolicy object (583)>, None, None]
[17/Jul/2025 11:00:47] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <Role: Role object (19)>, None, None]
[17/Jul/2025 11:00:47] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <Role: Role object (20)>, None, None]
[17/Jul/2025 11:00:47] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <Role: Role object (21)>, None, None]
[17/Jul/2025 11:00:47] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <Role: Role object (22)>, None, None]
[17/Jul/2025 11:00:47] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <Role: Role object (23)>, None, None]
[17/Jul/2025 11:00:47] [INFO] [specifyweb.specify.auditlog:100] inserting into auditlog: [0, <Role: Role object (24)>, None, None]
[17/Jul/2025 11:01:23] [WARNING] [specifyweb.specify.migration_utils.update_schema_config:199] Field does not exist in latest state of the datamodel, skipping Schema Config entry for: CollectionObjectGroup -> parentCog
[17/Jul/2025 11:01:23] [WARNING] [specifyweb.specify.migration_utils.update_schema_config:199] Field does not exist in latest state of the datamodel, skipping Schema Config entry for: CollectionObjectGroup -> parentCog
[17/Jul/2025 11:01:23] [WARNING] [specifyweb.specify.migration_utils.update_schema_config:199] Field does not exist in latest state of the datamodel, skipping Schema Config entry for: CollectionObjectGroup -> parentCog
[17/Jul/2025 11:01:23] [WARNING] [specifyweb.specify.migration_utils.update_schema_config:199] Field does not exist in latest state of the datamodel, skipping Schema Config entry for: CollectionObjectGroup -> parentCog
[17/Jul/2025 11:01:23] [WARNING] [specifyweb.specify.migration_utils.update_schema_config:199] Field does not exist in latest state of the datamodel, skipping Schema Config entry for: CollectionObjectGroup -> parentCog
[17/Jul/2025 11:01:23] [WARNING] [specifyweb.specify.migration_utils.update_schema_config:199] Field does not exist in latest state of the datamodel, skipping Schema Config entry for: CollectionObjectGroup -> parentCog
[17/Jul/2025 11:01:23] [WARNING] [specifyweb.specify.migration_utils.update_schema_config:199] Field does not exist in latest state of the datamodel, skipping Schema Config entry for: CollectionObjectGroup -> parentCog
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 33 items for table CollectionObjectGroup and container 1843
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 33 items for table CollectionObjectGroup and container 1860
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 33 items for table CollectionObjectGroup and container 1877
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 33 items for table CollectionObjectGroup and container 1894
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 33 items for table CollectionObjectGroup and container 1911
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 33 items for table CollectionObjectGroup and container 1928
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 33 items for table CollectionObjectGroup and container 1945
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 20 items for table collectionobjectgroupjoin and container 1844
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 20 items for table collectionobjectgroupjoin and container 1861
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 20 items for table collectionobjectgroupjoin and container 1878
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 20 items for table collectionobjectgroupjoin and container 1895
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 20 items for table collectionobjectgroupjoin and container 1912
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 20 items for table collectionobjectgroupjoin and container 1929
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 20 items for table collectionobjectgroupjoin and container 1946
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 2 items for table collectionobjectgrouptype and container 1842
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 2 items for table collectionobjectgrouptype and container 1859
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 2 items for table collectionobjectgrouptype and container 1876
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 2 items for table collectionobjectgrouptype and container 1893
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 2 items for table collectionobjectgrouptype and container 1910
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 2 items for table collectionobjectgrouptype and container 1927
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 2 items for table collectionobjectgrouptype and container 1944
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 10 items for table collectionobjecttype and container 1841
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 10 items for table collectionobjecttype and container 1858
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 10 items for table collectionobjecttype and container 1875
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 10 items for table collectionobjecttype and container 1892
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 10 items for table collectionobjecttype and container 1909
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 10 items for table collectionobjecttype and container 1926
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 10 items for table collectionobjecttype and container 1943
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 26 items for table absoluteage and container 1960
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 26 items for table absoluteage and container 1969
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 26 items for table absoluteage and container 1978
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 26 items for table absoluteage and container 1987
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 26 items for table absoluteage and container 1996
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 26 items for table absoluteage and container 2005
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 26 items for table absoluteage and container 2014
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 30 items for table relativeage and container 1961
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 30 items for table relativeage and container 1970
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 30 items for table relativeage and container 1979
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 30 items for table relativeage and container 1988
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 30 items for table relativeage and container 1997
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 30 items for table relativeage and container 2006
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 30 items for table relativeage and container 2015
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 7 items for table collectionobject and container 121
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 7 items for table collectionobject and container 366
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 7 items for table collectionobject and container 569
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 7 items for table collectionobject and container 618
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 7 items for table collectionobject and container 1188
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 7 items for table collectionobject and container 1538
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 7 items for table collectionobject and container 1788
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 4 items for table absoluteagecitation and container 1967
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 4 items for table absoluteagecitation and container 1976
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 4 items for table absoluteagecitation and container 1985
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 4 items for table absoluteagecitation and container 1994
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 4 items for table absoluteagecitation and container 2003
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 4 items for table absoluteagecitation and container 2012
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 4 items for table absoluteagecitation and container 2021
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 2 items for table relativeagecitation and container 1965
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 2 items for table relativeagecitation and container 1974
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 2 items for table relativeagecitation and container 1983
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 2 items for table relativeagecitation and container 1992
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 2 items for table relativeagecitation and container 2001
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 2 items for table relativeagecitation and container 2010
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 2 items for table relativeagecitation and container 2019
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 16 items for table tectonicunit and container 1964
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 16 items for table tectonicunit and container 1973
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 16 items for table tectonicunit and container 1982
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 16 items for table tectonicunit and container 1991
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 16 items for table tectonicunit and container 2000
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 16 items for table tectonicunit and container 2009
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 16 items for table tectonicunit and container 2018
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 12 items for table tectonicunittreedefitem and container 1963
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 12 items for table tectonicunittreedefitem and container 1972
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 12 items for table tectonicunittreedefitem and container 1981
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 12 items for table tectonicunittreedefitem and container 1990
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 12 items for table tectonicunittreedefitem and container 1999
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 12 items for table tectonicunittreedefitem and container 2008
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 12 items for table tectonicunittreedefitem and container 2017
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 6 items for table tectonicunittreedef and container 1962
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 6 items for table tectonicunittreedef and container 1971
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 6 items for table tectonicunittreedef and container 1980
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 6 items for table tectonicunittreedef and container 1989
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 6 items for table tectonicunittreedef and container 1998
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 6 items for table tectonicunittreedef and container 2007
[17/Jul/2025 11:01:59] [INFO] [specifyweb.specify.migration_utils.update_schema_config:830] Updating 6 items for table tectonicunittreedef and container 2016
[17/Jul/2025 11:03:24] [WARNING] [specifyweb.specify.migration_utils.update_schema_config:199] Field does not exist in latest state of the datamodel, skipping Schema Config entry for: CollectionObject -> parentCO
[17/Jul/2025 11:03:24] [WARNING] [specifyweb.specify.migration_utils.update_schema_config:199] Field does not exist in latest state of the datamodel, skipping Schema Config entry for: CollectionObject -> children
[17/Jul/2025 11:03:24] [WARNING] [specifyweb.specify.migration_utils.update_schema_config:199] Field does not exist in latest state of the datamodel, skipping Schema Config entry for: CollectionObject -> parentCO
[17/Jul/2025 11:03:24] [WARNING] [specifyweb.specify.migration_utils.update_schema_config:199] Field does not exist in latest state of the datamodel, skipping Schema Config entry for: CollectionObject -> children
[17/Jul/2025 11:03:24] [WARNING] [specifyweb.specify.migration_utils.update_schema_config:199] Field does not exist in latest state of the datamodel, skipping Schema Config entry for: CollectionObject -> parentCO
[17/Jul/2025 11:03:24] [WARNING] [specifyweb.specify.migration_utils.update_schema_config:199] Field does not exist in latest state of the datamodel, skipping Schema Config entry for: CollectionObject -> children
[17/Jul/2025 11:03:24] [WARNING] [specifyweb.specify.migration_utils.update_schema_config:199] Field does not exist in latest state of the datamodel, skipping Schema Config entry for: CollectionObject -> parentCO
[17/Jul/2025 11:03:24] [WARNING] [specifyweb.specify.migration_utils.update_schema_config:199] Field does not exist in latest state of the datamodel, skipping Schema Config entry for: CollectionObject -> children
[17/Jul/2025 11:03:24] [WARNING] [specifyweb.specify.migration_utils.update_schema_config:199] Field does not exist in latest state of the datamodel, skipping Schema Config entry for: CollectionObject -> parentCO
[17/Jul/2025 11:03:24] [WARNING] [specifyweb.specify.migration_utils.update_schema_config:199] Field does not exist in latest state of the datamodel, skipping Schema Config entry for: CollectionObject -> children
[17/Jul/2025 11:03:24] [WARNING] [specifyweb.specify.migration_utils.update_schema_config:199] Field does not exist in latest state of the datamodel, skipping Schema Config entry for: CollectionObject -> parentCO
[17/Jul/2025 11:03:24] [WARNING] [specifyweb.specify.migration_utils.update_schema_config:199] Field does not exist in latest state of the datamodel, skipping Schema Config entry for: CollectionObject -> children
[17/Jul/2025 11:03:24] [WARNING] [specifyweb.specify.migration_utils.update_schema_config:199] Field does not exist in latest state of the datamodel, skipping Schema Config entry for: CollectionObject -> parentCO
[17/Jul/2025 11:03:24] [WARNING] [specifyweb.specify.migration_utils.update_schema_config:199] Field does not exist in latest state of the datamodel, skipping Schema Config entry for: CollectionObject -> children
[17/Jul/2025 11:03:25] [INFO] [specifyweb.specify.tree_extras:543] set_fullnames: ('tectonicunit', 1, 7, False)
[17/Jul/2025 11:03:25] [DEBUG] [specifyweb.specify.tree_extras:568] fullname update sql:
update tectonicunit t0
left join tectonicunit t1 on t0.parentid = t1.tectonicunitid
left join tectonicunit t2 on t1.parentid = t2.tectonicunitid
left join tectonicunit t3 on t2.parentid = t3.tectonicunitid
left join tectonicunit t4 on t3.parentid = t4.tectonicunitid
left join tectonicunit t5 on t4.parentid = t5.tectonicunitid
left join tectonicunit t6 on t5.parentid = t6.tectonicunitid
left join tectonicunittreedefitem d0 on t0.tectonicunittreedefitemid = d0.tectonicunittreedefitemid
left join tectonicunittreedefitem d1 on t1.tectonicunittreedefitemid = d1.tectonicunittreedefitemid
left join tectonicunittreedefitem d2 on t2.tectonicunittreedefitemid = d2.tectonicunittreedefitemid
left join tectonicunittreedefitem d3 on t3.tectonicunittreedefitemid = d3.tectonicunittreedefitemid
left join tectonicunittreedefitem d4 on t4.tectonicunittreedefitemid = d4.tectonicunittreedefitemid
left join tectonicunittreedefitem d5 on t5.tectonicunittreedefitemid = d5.tectonicunittreedefitemid
left join tectonicunittreedefitem d6 on t6.tectonicunittreedefitemid = d6.tectonicunittreedefitemid
set t0.fullname = if(d0.isinfullname, concat_ws('', if(d6.isinfullname, concat_ws('', d6.textbefore, t6.name, d6.textafter, if((d5.isinfullname or d4.isinfullname or d3.isinfullname or d2.isinfullname or d1.isinfullname or d0.isinfullname), d6.fullnameseparator, '')), ''), if(d5.isinfullname, concat_ws('', d5.textbefore, t5.name, d5.textafter, if((d4.isinfullname or d3.isinfullname or d2.isinfullname or d1.isinfullname or d0.isinfullname), d5.fullnameseparator, '')), ''), if(d4.isinfullname, concat_ws('', d4.textbefore, t4.name, d4.textafter, if((d3.isinfullname or d2.isinfullname or d1.isinfullname or d0.isinfullname), d4.fullnameseparator, '')), ''), if(d3.isinfullname, concat_ws('', d3.textbefore, t3.name, d3.textafter, if((d2.isinfullname or d1.isinfullname or d0.isinfullname), d3.fullnameseparator, '')), ''), if(d2.isinfullname, concat_ws('', d2.textbefore, t2.name, d2.textafter, if((d1.isinfullname or d0.isinfullname), d2.fullnameseparator, '')), ''), if(d1.isinfullname, concat_ws('', d1.textbefore, t1.name, d1.textafter, if(d0.isinfullname, d1.fullnameseparator, '')), ''), if(d0.isinfullname, concat_ws('', d0.textbefore, t0.name, d0.textafter), '')), t0.name)
where t6.parentid is null
and t0.tectonicunittreedefid = 1
and t0.acceptedid is null



[17/Jul/2025 11:03:25] [INFO] [specifyweb.specify.tree_extras:543] set_fullnames: ('tectonicunit', 2, 7, False)
[17/Jul/2025 11:03:25] [DEBUG] [specifyweb.specify.tree_extras:568] fullname update sql:
update tectonicunit t0
left join tectonicunit t1 on t0.parentid = t1.tectonicunitid
left join tectonicunit t2 on t1.parentid = t2.tectonicunitid
left join tectonicunit t3 on t2.parentid = t3.tectonicunitid
left join tectonicunit t4 on t3.parentid = t4.tectonicunitid
left join tectonicunit t5 on t4.parentid = t5.tectonicunitid
left join tectonicunit t6 on t5.parentid = t6.tectonicunitid
left join tectonicunittreedefitem d0 on t0.tectonicunittreedefitemid = d0.tectonicunittreedefitemid
left join tectonicunittreedefitem d1 on t1.tectonicunittreedefitemid = d1.tectonicunittreedefitemid
left join tectonicunittreedefitem d2 on t2.tectonicunittreedefitemid = d2.tectonicunittreedefitemid
left join tectonicunittreedefitem d3 on t3.tectonicunittreedefitemid = d3.tectonicunittreedefitemid
left join tectonicunittreedefitem d4 on t4.tectonicunittreedefitemid = d4.tectonicunittreedefitemid
left join tectonicunittreedefitem d5 on t5.tectonicunittreedefitemid = d5.tectonicunittreedefitemid
left join tectonicunittreedefitem d6 on t6.tectonicunittreedefitemid = d6.tectonicunittreedefitemid
set t0.fullname = if(d0.isinfullname, concat_ws('', if(d6.isinfullname, concat_ws('', d6.textbefore, t6.name, d6.textafter, if((d5.isinfullname or d4.isinfullname or d3.isinfullname or d2.isinfullname or d1.isinfullname or d0.isinfullname), d6.fullnameseparator, '')), ''), if(d5.isinfullname, concat_ws('', d5.textbefore, t5.name, d5.textafter, if((d4.isinfullname or d3.isinfullname or d2.isinfullname or d1.isinfullname or d0.isinfullname), d5.fullnameseparator, '')), ''), if(d4.isinfullname, concat_ws('', d4.textbefore, t4.name, d4.textafter, if((d3.isinfullname or d2.isinfullname or d1.isinfullname or d0.isinfullname), d4.fullnameseparator, '')), ''), if(d3.isinfullname, concat_ws('', d3.textbefore, t3.name, d3.textafter, if((d2.isinfullname or d1.isinfullname or d0.isinfullname), d3.fullnameseparator, '')), ''), if(d2.isinfullname, concat_ws('', d2.textbefore, t2.name, d2.textafter, if((d1.isinfullname or d0.isinfullname), d2.fullnameseparator, '')), ''), if(d1.isinfullname, concat_ws('', d1.textbefore, t1.name, d1.textafter, if(d0.isinfullname, d1.fullnameseparator, '')), ''), if(d0.isinfullname, concat_ws('', d0.textbefore, t0.name, d0.textafter), '')), t0.name)
where t6.parentid is null
and t0.tectonicunittreedefid = 2
and t0.acceptedid is null



[17/Jul/2025 11:03:26] [INFO] [specifyweb.specify.tree_extras:543] set_fullnames: ('tectonicunit', 3, 7, False)
[17/Jul/2025 11:03:26] [DEBUG] [specifyweb.specify.tree_extras:568] fullname update sql:
update tectonicunit t0
left join tectonicunit t1 on t0.parentid = t1.tectonicunitid
left join tectonicunit t2 on t1.parentid = t2.tectonicunitid
left join tectonicunit t3 on t2.parentid = t3.tectonicunitid
left join tectonicunit t4 on t3.parentid = t4.tectonicunitid
left join tectonicunit t5 on t4.parentid = t5.tectonicunitid
left join tectonicunit t6 on t5.parentid = t6.tectonicunitid
left join tectonicunittreedefitem d0 on t0.tectonicunittreedefitemid = d0.tectonicunittreedefitemid
left join tectonicunittreedefitem d1 on t1.tectonicunittreedefitemid = d1.tectonicunittreedefitemid
left join tectonicunittreedefitem d2 on t2.tectonicunittreedefitemid = d2.tectonicunittreedefitemid
left join tectonicunittreedefitem d3 on t3.tectonicunittreedefitemid = d3.tectonicunittreedefitemid
left join tectonicunittreedefitem d4 on t4.tectonicunittreedefitemid = d4.tectonicunittreedefitemid
left join tectonicunittreedefitem d5 on t5.tectonicunittreedefitemid = d5.tectonicunittreedefitemid
left join tectonicunittreedefitem d6 on t6.tectonicunittreedefitemid = d6.tectonicunittreedefitemid
set t0.fullname = if(d0.isinfullname, concat_ws('', if(d6.isinfullname, concat_ws('', d6.textbefore, t6.name, d6.textafter, if((d5.isinfullname or d4.isinfullname or d3.isinfullname or d2.isinfullname or d1.isinfullname or d0.isinfullname), d6.fullnameseparator, '')), ''), if(d5.isinfullname, concat_ws('', d5.textbefore, t5.name, d5.textafter, if((d4.isinfullname or d3.isinfullname or d2.isinfullname or d1.isinfullname or d0.isinfullname), d5.fullnameseparator, '')), ''), if(d4.isinfullname, concat_ws('', d4.textbefore, t4.name, d4.textafter, if((d3.isinfullname or d2.isinfullname or d1.isinfullname or d0.isinfullname), d4.fullnameseparator, '')), ''), if(d3.isinfullname, concat_ws('', d3.textbefore, t3.name, d3.textafter, if((d2.isinfullname or d1.isinfullname or d0.isinfullname), d3.fullnameseparator, '')), ''), if(d2.isinfullname, concat_ws('', d2.textbefore, t2.name, d2.textafter, if((d1.isinfullname or d0.isinfullname), d2.fullnameseparator, '')), ''), if(d1.isinfullname, concat_ws('', d1.textbefore, t1.name, d1.textafter, if(d0.isinfullname, d1.fullnameseparator, '')), ''), if(d0.isinfullname, concat_ws('', d0.textbefore, t0.name, d0.textafter), '')), t0.name)
where t6.parentid is null
and t0.tectonicunittreedefid = 3
and t0.acceptedid is null



[17/Jul/2025 11:03:26] [INFO] [specifyweb.specify.tree_extras:543] set_fullnames: ('tectonicunit', 4, 7, False)
[17/Jul/2025 11:03:26] [DEBUG] [specifyweb.specify.tree_extras:568] fullname update sql:
update tectonicunit t0
left join tectonicunit t1 on t0.parentid = t1.tectonicunitid
left join tectonicunit t2 on t1.parentid = t2.tectonicunitid
left join tectonicunit t3 on t2.parentid = t3.tectonicunitid
left join tectonicunit t4 on t3.parentid = t4.tectonicunitid
left join tectonicunit t5 on t4.parentid = t5.tectonicunitid
left join tectonicunit t6 on t5.parentid = t6.tectonicunitid
left join tectonicunittreedefitem d0 on t0.tectonicunittreedefitemid = d0.tectonicunittreedefitemid
left join tectonicunittreedefitem d1 on t1.tectonicunittreedefitemid = d1.tectonicunittreedefitemid
left join tectonicunittreedefitem d2 on t2.tectonicunittreedefitemid = d2.tectonicunittreedefitemid
left join tectonicunittreedefitem d3 on t3.tectonicunittreedefitemid = d3.tectonicunittreedefitemid
left join tectonicunittreedefitem d4 on t4.tectonicunittreedefitemid = d4.tectonicunittreedefitemid
left join tectonicunittreedefitem d5 on t5.tectonicunittreedefitemid = d5.tectonicunittreedefitemid
left join tectonicunittreedefitem d6 on t6.tectonicunittreedefitemid = d6.tectonicunittreedefitemid
set t0.fullname = if(d0.isinfullname, concat_ws('', if(d6.isinfullname, concat_ws('', d6.textbefore, t6.name, d6.textafter, if((d5.isinfullname or d4.isinfullname or d3.isinfullname or d2.isinfullname or d1.isinfullname or d0.isinfullname), d6.fullnameseparator, '')), ''), if(d5.isinfullname, concat_ws('', d5.textbefore, t5.name, d5.textafter, if((d4.isinfullname or d3.isinfullname or d2.isinfullname or d1.isinfullname or d0.isinfullname), d5.fullnameseparator, '')), ''), if(d4.isinfullname, concat_ws('', d4.textbefore, t4.name, d4.textafter, if((d3.isinfullname or d2.isinfullname or d1.isinfullname or d0.isinfullname), d4.fullnameseparator, '')), ''), if(d3.isinfullname, concat_ws('', d3.textbefore, t3.name, d3.textafter, if((d2.isinfullname or d1.isinfullname or d0.isinfullname), d3.fullnameseparator, '')), ''), if(d2.isinfullname, concat_ws('', d2.textbefore, t2.name, d2.textafter, if((d1.isinfullname or d0.isinfullname), d2.fullnameseparator, '')), ''), if(d1.isinfullname, concat_ws('', d1.textbefore, t1.name, d1.textafter, if(d0.isinfullname, d1.fullnameseparator, '')), ''), if(d0.isinfullname, concat_ws('', d0.textbefore, t0.name, d0.textafter), '')), t0.name)
where t6.parentid is null
and t0.tectonicunittreedefid = 4
and t0.acceptedid is null



[17/Jul/2025 11:03:26] [INFO] [specifyweb.specify.tree_extras:543] set_fullnames: ('tectonicunit', 5, 7, False)
[17/Jul/2025 11:03:26] [DEBUG] [specifyweb.specify.tree_extras:568] fullname update sql:
update tectonicunit t0
left join tectonicunit t1 on t0.parentid = t1.tectonicunitid
left join tectonicunit t2 on t1.parentid = t2.tectonicunitid
left join tectonicunit t3 on t2.parentid = t3.tectonicunitid
left join tectonicunit t4 on t3.parentid = t4.tectonicunitid
left join tectonicunit t5 on t4.parentid = t5.tectonicunitid
left join tectonicunit t6 on t5.parentid = t6.tectonicunitid
left join tectonicunittreedefitem d0 on t0.tectonicunittreedefitemid = d0.tectonicunittreedefitemid
left join tectonicunittreedefitem d1 on t1.tectonicunittreedefitemid = d1.tectonicunittreedefitemid
left join tectonicunittreedefitem d2 on t2.tectonicunittreedefitemid = d2.tectonicunittreedefitemid
left join tectonicunittreedefitem d3 on t3.tectonicunittreedefitemid = d3.tectonicunittreedefitemid
left join tectonicunittreedefitem d4 on t4.tectonicunittreedefitemid = d4.tectonicunittreedefitemid
left join tectonicunittreedefitem d5 on t5.tectonicunittreedefitemid = d5.tectonicunittreedefitemid
left join tectonicunittreedefitem d6 on t6.tectonicunittreedefitemid = d6.tectonicunittreedefitemid
set t0.fullname = if(d0.isinfullname, concat_ws('', if(d6.isinfullname, concat_ws('', d6.textbefore, t6.name, d6.textafter, if((d5.isinfullname or d4.isinfullname or d3.isinfullname or d2.isinfullname or d1.isinfullname or d0.isinfullname), d6.fullnameseparator, '')), ''), if(d5.isinfullname, concat_ws('', d5.textbefore, t5.name, d5.textafter, if((d4.isinfullname or d3.isinfullname or d2.isinfullname or d1.isinfullname or d0.isinfullname), d5.fullnameseparator, '')), ''), if(d4.isinfullname, concat_ws('', d4.textbefore, t4.name, d4.textafter, if((d3.isinfullname or d2.isinfullname or d1.isinfullname or d0.isinfullname), d4.fullnameseparator, '')), ''), if(d3.isinfullname, concat_ws('', d3.textbefore, t3.name, d3.textafter, if((d2.isinfullname or d1.isinfullname or d0.isinfullname), d3.fullnameseparator, '')), ''), if(d2.isinfullname, concat_ws('', d2.textbefore, t2.name, d2.textafter, if((d1.isinfullname or d0.isinfullname), d2.fullnameseparator, '')), ''), if(d1.isinfullname, concat_ws('', d1.textbefore, t1.name, d1.textafter, if(d0.isinfullname, d1.fullnameseparator, '')), ''), if(d0.isinfullname, concat_ws('', d0.textbefore, t0.name, d0.textafter), '')), t0.name)
where t6.parentid is null
and t0.tectonicunittreedefid = 5
and t0.acceptedid is null



[17/Jul/2025 11:03:26] [INFO] [specifyweb.specify.tree_extras:543] set_fullnames: ('tectonicunit', 6, 7, False)
[17/Jul/2025 11:03:26] [DEBUG] [specifyweb.specify.tree_extras:568] fullname update sql:
update tectonicunit t0
left join tectonicunit t1 on t0.parentid = t1.tectonicunitid
left join tectonicunit t2 on t1.parentid = t2.tectonicunitid
left join tectonicunit t3 on t2.parentid = t3.tectonicunitid
left join tectonicunit t4 on t3.parentid = t4.tectonicunitid
left join tectonicunit t5 on t4.parentid = t5.tectonicunitid
left join tectonicunit t6 on t5.parentid = t6.tectonicunitid
left join tectonicunittreedefitem d0 on t0.tectonicunittreedefitemid = d0.tectonicunittreedefitemid
left join tectonicunittreedefitem d1 on t1.tectonicunittreedefitemid = d1.tectonicunittreedefitemid
left join tectonicunittreedefitem d2 on t2.tectonicunittreedefitemid = d2.tectonicunittreedefitemid
left join tectonicunittreedefitem d3 on t3.tectonicunittreedefitemid = d3.tectonicunittreedefitemid
left join tectonicunittreedefitem d4 on t4.tectonicunittreedefitemid = d4.tectonicunittreedefitemid
left join tectonicunittreedefitem d5 on t5.tectonicunittreedefitemid = d5.tectonicunittreedefitemid
left join tectonicunittreedefitem d6 on t6.tectonicunittreedefitemid = d6.tectonicunittreedefitemid
set t0.fullname = if(d0.isinfullname, concat_ws('', if(d6.isinfullname, concat_ws('', d6.textbefore, t6.name, d6.textafter, if((d5.isinfullname or d4.isinfullname or d3.isinfullname or d2.isinfullname or d1.isinfullname or d0.isinfullname), d6.fullnameseparator, '')), ''), if(d5.isinfullname, concat_ws('', d5.textbefore, t5.name, d5.textafter, if((d4.isinfullname or d3.isinfullname or d2.isinfullname or d1.isinfullname or d0.isinfullname), d5.fullnameseparator, '')), ''), if(d4.isinfullname, concat_ws('', d4.textbefore, t4.name, d4.textafter, if((d3.isinfullname or d2.isinfullname or d1.isinfullname or d0.isinfullname), d4.fullnameseparator, '')), ''), if(d3.isinfullname, concat_ws('', d3.textbefore, t3.name, d3.textafter, if((d2.isinfullname or d1.isinfullname or d0.isinfullname), d3.fullnameseparator, '')), ''), if(d2.isinfullname, concat_ws('', d2.textbefore, t2.name, d2.textafter, if((d1.isinfullname or d0.isinfullname), d2.fullnameseparator, '')), ''), if(d1.isinfullname, concat_ws('', d1.textbefore, t1.name, d1.textafter, if(d0.isinfullname, d1.fullnameseparator, '')), ''), if(d0.isinfullname, concat_ws('', d0.textbefore, t0.name, d0.textafter), '')), t0.name)
where t6.parentid is null
and t0.tectonicunittreedefid = 6
and t0.acceptedid is null



[17/Jul/2025 11:03:26] [INFO] [specifyweb.specify.tree_extras:543] set_fullnames: ('tectonicunit', 7, 7, False)
[17/Jul/2025 11:03:26] [DEBUG] [specifyweb.specify.tree_extras:568] fullname update sql:
update tectonicunit t0
left join tectonicunit t1 on t0.parentid = t1.tectonicunitid
left join tectonicunit t2 on t1.parentid = t2.tectonicunitid
left join tectonicunit t3 on t2.parentid = t3.tectonicunitid
left join tectonicunit t4 on t3.parentid = t4.tectonicunitid
left join tectonicunit t5 on t4.parentid = t5.tectonicunitid
left join tectonicunit t6 on t5.parentid = t6.tectonicunitid
left join tectonicunittreedefitem d0 on t0.tectonicunittreedefitemid = d0.tectonicunittreedefitemid
left join tectonicunittreedefitem d1 on t1.tectonicunittreedefitemid = d1.tectonicunittreedefitemid
left join tectonicunittreedefitem d2 on t2.tectonicunittreedefitemid = d2.tectonicunittreedefitemid
left join tectonicunittreedefitem d3 on t3.tectonicunittreedefitemid = d3.tectonicunittreedefitemid
left join tectonicunittreedefitem d4 on t4.tectonicunittreedefitemid = d4.tectonicunittreedefitemid
left join tectonicunittreedefitem d5 on t5.tectonicunittreedefitemid = d5.tectonicunittreedefitemid
left join tectonicunittreedefitem d6 on t6.tectonicunittreedefitemid = d6.tectonicunittreedefitemid
set t0.fullname = if(d0.isinfullname, concat_ws('', if(d6.isinfullname, concat_ws('', d6.textbefore, t6.name, d6.textafter, if((d5.isinfullname or d4.isinfullname or d3.isinfullname or d2.isinfullname or d1.isinfullname or d0.isinfullname), d6.fullnameseparator, '')), ''), if(d5.isinfullname, concat_ws('', d5.textbefore, t5.name, d5.textafter, if((d4.isinfullname or d3.isinfullname or d2.isinfullname or d1.isinfullname or d0.isinfullname), d5.fullnameseparator, '')), ''), if(d4.isinfullname, concat_ws('', d4.textbefore, t4.name, d4.textafter, if((d3.isinfullname or d2.isinfullname or d1.isinfullname or d0.isinfullname), d4.fullnameseparator, '')), ''), if(d3.isinfullname, concat_ws('', d3.textbefore, t3.name, d3.textafter, if((d2.isinfullname or d1.isinfullname or d0.isinfullname), d3.fullnameseparator, '')), ''), if(d2.isinfullname, concat_ws('', d2.textbefore, t2.name, d2.textafter, if((d1.isinfullname or d0.isinfullname), d2.fullnameseparator, '')), ''), if(d1.isinfullname, concat_ws('', d1.textbefore, t1.name, d1.textafter, if(d0.isinfullname, d1.fullnameseparator, '')), ''), if(d0.isinfullname, concat_ws('', d0.textbefore, t0.name, d0.textafter), '')), t0.name)
where t6.parentid is null
and t0.tectonicunittreedefid = 7
and t0.acceptedid is null

[17/Jul/2025 11:03:26] [ERROR] [specifyweb.specify.management.commands.run_key_migration_functions:97] An error occurred: Cannot resolve keyword 'selectseries' into field. Choices are: contextname, contexttableid, countonly, createdbyagent, createdbyagent_id, fields, formatauditrecids, id, isfavorite, modifiedbyagent, modifiedbyagent_id, name, ordinal, remarks, reports, searchsynonymy, selectdistinct, smushed, specifyuser, specifyuser_id, sqlstr, timestampcreated, timestampmodified, version
Traceback (most recent call last):
  File "/opt/specify7/manage.py", line 25, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/specify7/ve/lib/python3.9/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/opt/specify7/ve/lib/python3.9/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/specify7/ve/lib/python3.9/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/opt/specify7/ve/lib/python3.9/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
  File "/opt/specify7/specifyweb/specify/management/commands/run_key_migration_functions.py", line 109, in handle
    key_migration_func_pipeline(self)
  File "/opt/specify7/specifyweb/specify/management/commands/run_key_migration_functions.py", line 95, in key_migration_func_pipeline
    fix_misc()
  File "/opt/specify7/specifyweb/specify/management/commands/run_key_migration_functions.py", line 83, in fix_misc
    make_selectseries_false(apps) # specify 0031
  File "/opt/specify7/specifyweb/specify/migration_utils/misc_migrations.py", line 5, in make_selectseries_false
    spquery.objects.filter(selectseries=None).update(selectseries=False)
  File "/opt/specify7/ve/lib/python3.9/site-packages/django/db/models/manager.py", line 87, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/opt/specify7/ve/lib/python3.9/site-packages/django/db/models/query.py", line 1436, in filter
    return self._filter_or_exclude(False, args, kwargs)
  File "/opt/specify7/ve/lib/python3.9/site-packages/django/db/models/query.py", line 1454, in _filter_or_exclude
    clone._filter_or_exclude_inplace(negate, args, kwargs)
  File "/opt/specify7/ve/lib/python3.9/site-packages/django/db/models/query.py", line 1461, in _filter_or_exclude_inplace
    self._query.add_q(Q(*args, **kwargs))
  File "/opt/specify7/ve/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1546, in add_q
    clause, _ = self._add_q(q_object, self.used_aliases)
  File "/opt/specify7/ve/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1577, in _add_q
    child_clause, needed_inner = self.build_filter(
  File "/opt/specify7/ve/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1427, in build_filter
    lookups, parts, reffed_expression = self.solve_lookup_type(arg, summarize)
  File "/opt/specify7/ve/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1237, in solve_lookup_type
    _, field, _, lookup_parts = self.names_to_path(lookup_splitted, self.get_meta())
  File "/opt/specify7/ve/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1725, in names_to_path
    raise FieldError(
django.core.exceptions.FieldError: Cannot resolve keyword 'selectseries' into field. Choices are: contextname, contexttableid, countonly, createdbyagent, createdbyagent_id, fields, formatauditrecids, id, isfavorite, modifiedbyagent, modifiedbyagent_id, name, ordinal, remarks, reports, searchsynonymy, selectdistinct, smushed, specifyuser, specifyuser_id, sqlstr, timestampcreated, timestampmodified, version
specify@fe5dcbea6fd5:/opt/specify7$ 

See the following error:

django.core.exceptions.FieldError: Cannot resolve keyword 'selectseries' into field. Choices are: contextname, contexttableid, countonly, createdbyagent, createdbyagent_id, fields, formatauditrecids, id, isfavorite, modifiedbyagent, modifiedbyagent_id, name, ordinal, remarks, reports, searchsynonymy, selectdistinct, smushed, specifyuser, specifyuser_id, sqlstr, timestampcreated, timestampmodified, version

@acwhite211
Copy link
Member Author

I can remove the selectseries part if your database instance is having trouble with it. All the other information in the logs looks good.

@acwhite211
Copy link
Member Author

I'll see if I can add more verbose logging to the permission related migration tasks.

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.

In the database locally, I used Specify 6 to add a new discipline (named "New Entomology") with a new collection inside. This should not have any of the new tables or fields in the interface schema, no collection object type set, and none of the 7-only features like our permission system. Field-level permissions would not yet be set, etc.

Permissions

After the ve/bin/python manage.py run_key_migration_functions command, I see that the users who were given permissions in Specify 6 had those applied in Specify 7, but they do not have collection access:

Image

This means they aren't able to login to the database without an existing Specify 7 admin explicitly granting them permission to access the collection. It needs to give them collection access as well.

For users who are in collections that have already had their permissions migrated, their Specify 6 permissions are migrated again, meaning they might get more access to the database than they had when the Specify 7 permissions were configured:

Image

From #6265:

  • Ensure that users are assigned to the correct roles without overwriting any manual adjustments made in Specify 7 for the other collections.

This should be more clear– "manual adjustments" really mean any permission changes in 7. In short, once this migration has been run for a user in a given collection, it should not run again even when this command is run.

This should only really be applied for users who do not yet have any Specify 7 permissions in a given collection.

Schema Config

After running the command the first time, I did some extensive customization on a 7-only table (collectionobjectgroup), renaming fields, changing their visibility, setting some to have pick lists, changing the captions, descriptions, etc.

Image

I then ran ve/bin/python manage.py run_key_migration_functions, and immediately all of my customizations were lost:

Image

This seems to only affect new tables and fields created via Django migrations.

Uniqueness Rules

I removed the catalog number uniqueness rule from one of the collections:

Image

I ran ve/bin/python manage.py run_key_migration_functions, and then it was restored, which should not happen since this migration was already run on this collection:

Image

Collection Object Types

I created a new COT and set it as the default for the collection. I wanted to make a sequel to the default type:

Image

Seems that it does persist after the command is run! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Dev Attention Needed
Development

Successfully merging this pull request may close these issues.

2 participants