Created
September 5, 2019 14:29
-
-
Save Jlaird/e9cb0ebdc7aba3ed521fb4b84099c774 to your computer and use it in GitHub Desktop.
List the content and asset counts
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 dbs = db.runCommand('listDatabases').databases.filter(({ name }) => name.contains('_platform')).map(({ name }) => name) | |
dbs.forEach((name) => { | |
var content = db.getSiblingDB(name).getCollection('Content').count(); | |
var assets = db.getSiblingDB(name).getCollection('Asset').count(); | |
print(`${name}: ${content} content, ${assets} assets`); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment