-
Notifications
You must be signed in to change notification settings - Fork 332
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
[ENG-6806] manage.py command for versioned preprint migration #10883
[ENG-6806] manage.py command for versioned preprint migration #10883
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.
Make some tweaks 🎆
if not guid: | ||
if dry_run: | ||
self.stdout.write(self.style.ERROR( | ||
f'Preprint object [pk={preprint.pk}] will be skipped due to missing guid.' | ||
)) |
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.
My local DB is not in good shape so I happen to have preprints without guid or versioned guid. I don't think this will happen on servers but just in case we have corrupted data from ancient times, this piece skips them if it ever happens.
a5644e2
to
a3c2031
Compare
2a5e3a8
into
CenterForOpenScience:feature/preprints-doi-versioning
…nage_command [ENG-6806] manage.py command for versioned preprint migration
Purpose
Turn the migration
.py
into an command with params and fix the typo in queryChanges
QA Notes
N/A
Documentation
N/A
Side Effects
N/A
Ticket
https://openscience.atlassian.net/browse/ENG-6806