# Indices that need to be added manually:
#
# invoke shell --no-transaction

from pymongo import ASCENDING, DESCENDING


db['user'].create_index([
    ('emails', ASCENDING),
])

db['user'].create_index([
    ('external_accounts', ASCENDING),
])

db['user'].create_index([
    ('emails', ASCENDING),
    ('username', ASCENDING),
])

db['node'].create_index([
    ('is_deleted', ASCENDING),
    ('is_collection', ASCENDING),
    ('is_public', ASCENDING),
    ('institution_id', ASCENDING),
    ('is_registration', ASCENDING),
    ('contributors', ASCENDING),
])

db['node'].create_index([
    ('tags', ASCENDING),
    ('is_public', ASCENDING),
    ('is_deleted', ASCENDING),
    ('institution_id', ASCENDING),
])

@@ -113,16 +113,80 @@
 ENDING%0A%0A
+db%5B'storedfilenode'%5D.create_index(%5B%0A    ('tags', ASCENDING),%0A%5D)%0A
 %0Adb%5B'use

Add index on file tags field