Skip to content
Snippets Groups Projects
Commit f00ed121 authored by Harsha Kethineni's avatar Harsha Kethineni
Browse files

Reupdate collections including analyses

parent d014e7cc
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,7 @@ from api.jobs import gears
from api.types import Origin
from api.jobs import batch
CURRENT_DATABASE_VERSION = 36 # An int that is bumped when a new schema change is made
CURRENT_DATABASE_VERSION = 37 # An int that is bumped when a new schema change is made
def get_db_version():
......@@ -1211,6 +1211,13 @@ def upgrade_to_36():
cursor = config.db.acquisitions.find({'files': { '$gt': [] }, 'files.mimetype': None})
process_cursor(cursor, upgrade_to_36_closure)
def upgrade_to_37():
"""
scitran/core issue #916 - group-permission level site info needs to be removed from all levels
"""
for coll in ['acquisitions', 'groups', 'projects', 'sessions', 'analyses']:
cursor = config.db[coll].find({'permissions.site': {'$exists': True}})
process_cursor(cursor, upgrade_to_32_closure, context = coll)
###
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment