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

Migrations: Implement adapter method that deletes field from all documents in collection #2263

Conversation

eecavanna
Copy link
Collaborator

In this branch, I implemented an adapter method named remove_field_from_each_document , which migrator authors can use to delete a given field from every document in a given collection.

Previously, migrator authors could do this by iterating over documents in Python. This new adapter method delegates the iteration to MongoDB.

Fixes #2261

Copy link

PR Preview Action v1.4.8
🚀 Deployed preview to https://microbiomedata.github.io/nmdc-schema/pr-preview/pr-2263/
on branch gh-pages at 2024-11-12 23:13 UTC

@eecavanna
Copy link
Collaborator Author

Merging without additional review (with respect to the self-review I did just now) so that the reviewers can focus on the third PR (the one that impacts the outside world): #2265

@eecavanna eecavanna merged commit 316a792 into main Nov 12, 2024
3 checks passed
@eecavanna eecavanna deleted the 2261-migrations-implement-adapter-method-delete_field_from_each_document branch November 12, 2024 23:39
@eecavanna eecavanna mentioned this pull request Nov 12, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrations: Implement adapter method delete_field_from_each_document
1 participant