[SERVER-22551] Make db.dropDatabase() shell helper take an argument Created: 10/Feb/16 Updated: 06/Dec/22 Resolved: 03/Dec/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Joe Drumgoole (Inactive) | Assignee: | Backlog - Server Tooling and Methods (STM) (Inactive) |
| Resolution: | Won't Fix | Votes: | 3 |
| Labels: | move-stm | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Server Tooling & Methods
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||
| Description |
|
Dropping a database is a big deal. The current shell command db.dropDatabase() defaults to the current selected database and drops the database without confirmation. I would suggest we add an argument to the command that explicitly names the database so that accidental drops don't occur because the wrong database was "used" in a previous command. The shell should also ask for confirmation before performing this action. |
| Comments |
| Comment by Brooke Miller [ 03/Dec/21 ] |
|
We've deprecated the mongo shell in favor of the new mongosh. Unfortunately, we aren't able to pursue improvements to the deprecated shell except in extreme cases, such as critical security fixes. Please start making use of mongosh and let us know if it works for you in this case. |