Schema and models are out of sync
|Assignee:||Dan Gillean||% Done:|
|Category:||Data model / ORM|
|Target version:||Release 2.2.1|
|Google Code Legacy ID:||Tested version:|
In qa/2.3.x digital_object.lft and digital_object.rgt were not completely removed In qa/2.3.x granted_right was missing in schema.yml and some properties did not make it into the models
- Changes in event table (information_object_id col was replaced with object_id) are not fully integrated in the models (see https://github.com/artefactual/atom/pull/106 for more details) - in qa/2.3.x this is what you get in BaseInformationObject after running prople:build-model: https://gist.github.com/sevein/f8d82ea43a2fce37dc0b - there are multiple places in the application where we relied on ->events, should we be using ->eventsRelatedByobjectId instead? A possible workaround was documented in the mailing list to one of our users: https://groups.google.com/d/msg/ica-atom-users/QIxBmWNtNLE/AD6EEU99BAAJ
#4 Updated by Jesús García Crespo about 5 years ago
- Status changed from New to QA/Review
- Assignee set to Mike Gale
Solution for #1 and #2 here: https://github.com/artefactual/atom/commit/e29034cd0c6d267a14a7aa8a7888b04d51cf2128
#6 Updated by Jesús García Crespo about 5 years ago
- Status changed from Code Review to New
- Assignee deleted (
Our solutions for 1) and 2) have been included in qa/2.3.x, we haven't addressed 3) yet.
Feel free to reuse dev/issue-8784-modelschema-sync. This is the output of git diff after running propel:build-model: https://gist.github.com/sevein/f8d82ea43a2fce37dc0b.
#14 Updated by Jesús García Crespo almost 5 years ago
- Status changed from Code Review to Feedback
- Assignee changed from Jesús García Crespo to José Raddaoui Marín
Nice, Radda. I'm surprised this only took you five hours. I think next it'd be nice to identify the different parts of the application affected by this commit, prepare a list and send it to Dan. We need to verify that this is not introducing new bugs.
#15 Updated by José Raddaoui Marín almost 5 years ago
- Status changed from Feedback to QA/Review
- Assignee changed from José Raddaoui Marín to Dan Gillean
This should affect all the places where we work with events, the ones I found and fixed are the following:
- Add, edit and delete event in the information object edit pages. In all templates
- View events in the information objects index pages. In all templates
- Delete repositories with events associated (not sure how the events are added to the repos, but the delete code is there)
- Delete a term that is used as event type in any event
- DIP upload with creator in dmdSec section Dublin Core data
- CSV export
- Add, edit and delete event in the accession edit page
- Create information object from accession with events
Other import/export cases use the same functions used when the events are managed in the information object edit and index pages.
I may have missed something else, if you think on any other place that uses events, please test it as well.
#18 Updated by Dan Gillean almost 5 years ago
- Status changed from QA/Review to Verified
I haven't tested DIP upload cuz I don't have a set-up for that. If we think that is important, maybe I can pass this to Sarah, or someone on the AM team.
Otherwise, I have tried to test all of the behaviors described above, and some more. I did not encounter any issues. LGTM!
#19 Updated by David Juhasz almost 5 years ago
I cherry-picked the fix to stable/2.2.x: https://github.com/artefactual/atom/commit/b038f6ab3905153425065e1f4d0d0724eebdb475