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 delete_field_from_each_document #2261

Closed
eecavanna opened this issue Nov 12, 2024 · 0 comments · Fixed by #2263
Closed

Migrations: Implement adapter method delete_field_from_each_document #2261

eecavanna opened this issue Nov 12, 2024 · 0 comments · Fixed by #2263
Assignees
Labels
enhancement New feature or request X SMALL Less than 8 hours, less than 1 day

Comments

@eecavanna
Copy link
Collaborator

eecavanna commented Nov 12, 2024

Adapter method signature:

def delete_field_from_each_document(
    self,
    collection_name: str,
    field_name: str,
) -> None:
    r"""
    Deletes the specified field from each document in the collection.
    """
    pass

Mongo query (docs):

db.collection.updateMany({}, {$unset: {foo: 1}}); // delete `foo` field from each document
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request X SMALL Less than 8 hours, less than 1 day
Projects
Status: Done
1 participant