rename-collection
Renames a MongoDB collection by specifying the database, collection, and new name, with an option to drop the target collection if it exists.
Instructions
Renames a collection in a MongoDB database
Input Schema
Name | Required | Description | Default |
---|---|---|---|
collection | Yes | Collection name | |
database | Yes | Database name | |
dropTarget | No | If true, drops the target collection if it exists | |
newName | Yes | The new name for the collection |