-
Notifications
You must be signed in to change notification settings - Fork 36
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
Add cojo to Schema Config #5388
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing instructions
- Go to schema config
- Select COG, COGT, or CO as base table
- Click on uniqueness rules
- Add new rule
- Scroll down to relationships
- Verify there are no empty fields/relationships
No more blank relationships on those tables 👍
Side note: applying migrations on a production db still resulted in a single blank option (for children I think). Trying the migrations on a fresh db fixed it, but resulted in two children relationships appearing in the schema config, but its not related to this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing instructions
- Go to schema config
- Select COG, COGT, or CO as base table
- Click on uniqueness rules
- Add new rule
- Scroll down to relationships
- Verify there are no empty fields/relationships
Tried on two dbs and both resulted in some of the relationships still being empty. I am willing to believe this is a db problem however if it is, then we need to figure out which dbs do work. Tried with kufish212 and kubirds20240606
@emenslin It does seem like a db issue. I ssh'd into the kufish container and it looks like the migration in this PR didn't get applied at all.
I get this error when I try to apply those migrations and so I think this db is corrupted:
kubirds20240606 does have all migrations so it's strange that it has missing fields.
I noticed the fields in Schema config on that db are capitalized instead of camelCased. My guess is that the initial dump of that db already had an older version of the geo migration applied to it. The geo migration was changed later to use camelCased fields but those changes never got applied and so some newer fields never got added (parentCojo, createdByAgent and modifiedByAgent). I have manually reapplied all migrations to kubirds20240606 so it should work fine now |
Pushed a fix for the duplicate children field. However, this would have to be tested by creating another copy of a db as it changes an old migration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like #5384 has made the tectonic rank migration irreversible since the migration tries to delete the root rank when reversing, which is no longer allowed. I'll edit that migration and reapply migrations for the dbs mentioned in this PR. |
@combs-a Created a new db |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing instructions
- Go to schema config
- Select COG, COGT, or CO as base table
- Click on uniqueness rules
- Add new rule
- Scroll down to relationships
- Verify there are no empty fields/relationships
Empty field on COG. COGT, and CO do not have any empty fields!
https://cuic22024-issue-5386.test.specifysystems.org/specify/overlay/configure/uniqueness/collectionobjectgroup
@pashiav I have reapplied all migrations on that db, should be fixed now |
If a field other than DBs tested on this PR: |
migration issues, info here: #5388 (comment)
Fixes #5386
The missing relationships were due to COG -> cojo and CO -> cojo not being present in Schema Config. There were some more missing fields like
createdByAgent
andtimestampCreated
but those are from migration issues. If we test this PR with a fresh db, those fields shouldn't be missingChecklist
and self-explanatory (or properly documented)
Testing instructions