Back to index

plone3  3.1.7
migrateStorage.py
Go to the documentation of this file.
00001 ## Script (Python) "migrateStorage"
00002 ##bind container=container
00003 ##bind context=context
00004 ##bind namespace=
00005 ##bind script=script
00006 ##bind subpath=traverse_subpath
00007 ##parameters=
00008 ##title=Migrate the Storage
00009 ##
00010 from Products.CMFCore.utils import getToolByName
00011 storage = getToolByName(context, "portal_historiesstorage")
00012 result = storage.migrateStorage()
00013 if result is None:
00014     return "no storage migration necessary: nothing done"
00015 
00016 return "migrated %s histories and a total of %s versions in in %.2f seconds" \
00017        % result