[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:
Duplicate
is duplicated by SERVER-31326 dropDatabase should be harder Closed
Related
is related to SERVER-36803 Ability to prompt for user input in s... Closed
Assigned Teams:
Server Tooling & Methods
Participants:
Case:

 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.

Generated at Thu Feb 08 04:00:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.