[DOCS-537] renameCollection command should say it can move collections Created: 20/Sep/12  Updated: 02/Oct/12  Resolved: 01/Oct/12

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Trivial - P5
Reporter: Gianfranco Palumbo Assignee: Ed Costello
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 11 years, 21 weeks, 1 day ago

 Description   

After looking for a command in the docs on moving or copying a collection, the search didn't find anything because it didn't mention that you can move a collection between databases.

db.runCommand( {renameCollection: "sourcedb.mycol", to: "targetdb.mycol"} )



 Comments   
Comment by Scott Hernandez (Inactive) [ 25/Sep/12 ]

Um, this changes looks wrong with misleading examples and is missing a note about the collection method pre-pending the database name; so that the helper and the command take very different arguments.

We should be testing and validating examples before we put them in the docs.

Here is the code: https://github.com/mongodb/mongo/blob/master/src/mongo/db/cloner.cpp#L720

Also, you should like the other user assert messages/codes.

Comment by Ed Costello [ 24/Sep/12 ]

Will be fixed by changes in DOCS-540 and this commit: https://github.com/mongodb/docs/pull/259

Generated at Thu Feb 08 07:38:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.