Skip to content
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

TASK-7207 - Fix Organization migration issue #2531

Open
wants to merge 2 commits into
base: release-3.0.x
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -579,9 +579,15 @@ private void changeFqns() throws CatalogDBException, MigrationException {
))
);

// Ensure all jobs have attributes field
Bson jobQuery = Filters.eq("attributes", null);
Bson update = new Document("$set", new Document("attributes", new Document()));
jobCollection.updateMany(jobQuery, update);
jobDeletedCollection.updateMany(jobQuery, update);

// Change fqn in all jobs that were pointing to this study
Bson jobQuery = Filters.eq("studyUid", studyUid);
Bson update = new Document("$set", new Document()
jobQuery = Filters.eq("studyUid", studyUid);
update = new Document("$set", new Document()
.append("study.id", newFqn)
.append("attributes.OPENCGA.3_0_0", new Document()
.append("date", date)
Expand Down