Package: imio.migrator
This package propose some infrastructure and helper methods to manage migrations (upgrade steps)Changelog1.34 (2024-02-08)CorrectedMigrator.cleanRegistriesto really save portal_setup changes.
[sgeulette]1.33 (2023-04-14)AddedMigrator.clean_orphan_brainsthat will uncatalog orphan brains.
[gbastien]1.32 (2022-07-01)Addedutils.ensure_upgradedthat will make sure a givenpackage_nameis upgraded,
this is useful when some content or registry records need to be present to handle some code.
Here the usecase is a Zope starting handler needing a registry record that may not be present
if package not upgraded.
[gbastien]1.31 (2022-05-16)Addedis_in_partfunction to run partially a migration with imio.updates. (See
FUNC_PARTS inhttps://github.com/IMIO/imio.updates/blob/master/README.rst)
[sgeulette]1.30 (2021-11-15)ModifiedrunProfileStepsmethod by changing default value of parameterrun_dependencies.
Now it’s False by default !!
[sgeulette]AddedrunProfileStepsdocstring.
[sgeulette]1.29 (2021-07-16)Log more infos when updating workflows inMigrator.refreshDatabase(workflows=True).
[gbastien]1.28 (2021-06-04)Added parametertotal_number=Nonetoutils.end_time, when an integer
is given, the generated message will include info about number of elements
processed per second.
[gbastien]1.27 (2021-03-24)Moved end time computation and display toutils.end_timeso it is easy to
reuse in other contexts.
Displaydays/hours/minutesonly if relevant.
[gbastien]1.26 (2020-09-07)Log every 1000 elements instead 100 inMigrator.reindexIndexesandMigrator.reindexIndexesFor.
[gbastien]1.25 (2020-08-18)InMigrator.removeUnusedPortalTypes, remove alsoportal_typesfromsite_properties.types_not_searched.
[gbastien]1.24 (2020-06-29)Fix python 3.8 synthax error.
[odelaere]1.23 (2020-05-08)ZLogHandler.initdoes NOT display a starting message,
useZLogHandler.infoto display initial message so we know
what we are doing.
[gbastien]1.22 (2020-04-29)ChangedZLogHandlersteps from 10 to 100 inreindexIndexesForandreindexIndexestoo avoid to fast log scrolling.
[gbastien]1.21 (2020-04-23)Display always warnings at the end of the migration,
displayNo warnings.if there were not.
[gbastien]1.20 (2020-03-12)Addedmigrator.reindexIndexesmethod that mimics the Catalog method
but let’s filteron meta_type/portal_typeand chose toupdate_matadata.
[gbastien]1.19 (2020-02-18)Added logging inMigrator.reindexIndexesFor.
[gbastien]1.18 (2019-11-25)Added run_dependencies parameter in runProfileSteps method.
[sgeulette]1.17 (2019-10-14)Add some more logging for actionsClear and rebuildorRefreshcatalog.
[gbastien]Added parametercatalogsToUpdatetorefreshDatabaseso we can define what
catalog will be refreshed because by default, every catalogs are refreshed
and it is rarely necessary.
[gbastien]1.16 (2019-09-12)AddedMigrator.reindexIndexesFor(idxs=[], **query)method to be able to
easily reindex givenidxs(indexes) on brains returned by
a given catalogquery.
[gbastien]1.15 (2019-09-12)Highlight log message about warning messages encountered durung migration.
[gbastien]FixedMigrator.refreshDatabasemethod, wfs passed toWorkflowTool._recursiveUpdateRoleMappingsneed to be a dict withwf idaskeyandwf objectasvalue, we hadwf objectforkeyandvalue.
[gbastien]1.14 (2019-07-19)Use same format when displaying duration of migration, duration is displayed
in days/hours/minutes/seconds in any cases.
[gbastien]1.13 (2019-06-28)Be more preceise regarding duration of migration
(display in seconds and hours/minutes).
[gbastien]1.12 (2019-06-14)Migrator class is no more an old-style class (it inherits from object now).
[gbastien]1.11 (2019-05-16)Added parameterworkflowsToUpdate=[]torefreshDatabasemethod so when
parameterworkflows=True, we may define which workflows to update.
If nothing defined, every workflows are updated.
[gbastien]Moved methods that disable/restoreenable_link_integrity_checkstoimio.helpers.content.
[gbastien]Makeportal_workflowavailable usingself.wfTool.
[gbastien]1.10 (2019-03-28)Added a ZLogHandler when updating catalog so some logging showing progression
is shown in the Zope log.
[gbastien]Set a value in the REQUESTimio_migrator_currently_migratingduring
migration so it can be used by other code to know that we are in a migration
process.
[gbastien]Defineself.catalogandself.registryon base Migrator class so it is
available for subclasses.
[gbastien]Added methodMigrator.removeUnusedPortalTypesthat will removeportal_typespassed as parameter from toolsportal_typesandportal_factory.
[gbastien]Requiresimio.helpers.
[gbastien]Added parameterdisable_linkintegrity_checks=FalsetoMigrator.__init__so it is easier to disable linkintegrity checks during a migration.
Supposed to work with Plone4 and Plone5…
[gbastien]Added install method
[sgeulette]1.9 (2019-01-17)Improved and simplified upgradeProfile method
[sgeulette]1.8 (2018-10-18)Make REQUEST available thru self.request.
[gbastien]Added methodsremoveUnusedColumnsandremoveUnusedIndexesto easily remove
columns or indexes from portal_catalog.
[gbastien]Possibility to run specific upgrade steps
[sgeulette]1.7 (2018-06-26)Improved reinstall method.
[sgeulette]Improved upgrade step to set directly rigth version.
[sgeulette]1.6 (2016-12-07)Added methodwarnthat manages warning messages, it will display the warning
like before in the Zope log but will also store it so every warnings are
displayed togheter at the end of the migration.
[gbastien]Methodreinstallmay now receive paremetersignore_dependenciesanddependency_strategyto use it when callingportal_setup.runAllImportStepsFromProfile.
This is only useable with Products.GenericSetup >= 1.8.0 (Plone >= 4.3.8).
[gbastien]1.5 (2015-11-24)Added method to run given steps of a profile.
[sgeulette]1.4 (2015-01-15)Display the catalog we are currently recataloging as several can be recataloged,
like in version 1.1 but this was lost somehow…
[gbastien]After an upgrade step has been executed, set manually new installed profile version
or despite upgrade step has been executed, it is still considered not
[gbastien]1.3 (2014-10-24)Added methods to run upgrade steps for a given profile or all installed profiles (with pqi update).
[sgeulette]1.2 (2014-08-18)Added method to clean registries (portal_javascripts, portal_css and portal_setup)1.1 (2014-01-30)Display the catalog we are currently recataloging as several can be recatalogedPrepare release on pypi.imio.be1.0 (2013-08-20)Manage base migrator, reinstall profiles, refresh catalogs/workflow security, log start/end timestamp