Created
September 1, 2020 19:46
-
-
Save dublado/076078bd6621da164d9b30577a1a6c1e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var collectionNames = db.getCollectionNames(), stats = []; | |
collectionNames.forEach(function (n) { stats.push(n); }); | |
for (var c in stats) { | |
switch(stats[c]){ | |
default: | |
if(stats[c].startsWith('profissionais')){ | |
db.getSiblingDB("uptime").getCollection(stats[c]).drop() | |
print(stats[c]); | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment