Some helpers and examples to use during migrations.
They are mostly meant to copy & paste the code from here to your own packages.
This was written for the talk "Migrations! Migrations! Migrations!" at Plone Conference 2019 in Ferrara: https://2019.ploneconf.org/talks/migrations-migrations-migrations
Here is a list of methods this package contains:
Browser-Views to get information about the portal:
- Get info about the content is in the portal.
- How many MB of which content is there really?
- Get info about content-types that may needs to be replaced
- Export info about local roles. A alternative would be zopyx.plone.cassandra
Prepare the portal for a migration
- Disable solr
- Disable ldap/ad-plugins
- Remove any portal_skin an portal_view_customization overrides.
- Release all WebDAV Locks.
Fremove obsolete content and settings
- Deletes heavy content
- Clear out portal_historiesstorage
- Disable diazo theme, enable suburst (useful for Plone 4)
- Remove 95% of all content leaving at least one item for each type. Keep all folderish items unless specified.
- Example that removes Products.PloneFormGen
- Example that removes Products.PloneKeywordManager
- Example that removes Solgema.fullcalendar
- Example that removes a cubic ton of addons
- Remove obsolete behaviors
- Example that removes p4a.subtyper utilities (used in collective.easyslideshow)
- Example that removes p4a.subtyper utilities
Some examples that remove various adapters, subscriber and utilities.
- Use alias_module (see patches.py)
Remove broken and outdated import/export steps
Examples that can help migrating from LinguaPlone to plone.app.multilingual
- Crazy method that sets languages, adds and links translations so that we can migrate to pam.
- Install pam and setup site
- Migrate LinguaPlone to plone.app.multilingual This mostly uses the migration that is builtin in plone.app.multilingual
Methods to migrate default content to Dexterity.
A example that migrated PloneHelpCenter to default Dexterity content.
- Run the whole miration
- Remove custom layout.
- Example custom field-migrator that appends text to a existing richtext-field.
- Example custom field-migrator that appends text to a existing text-field.
- Some Methods that migrate the various types in PHC
- A example on how to struture a migration from PloneFormGen to collective.easyform.
- Uninstall Archetypes and remove all of its traces.
Multilple examples of patches using alias_module to deal with migration-problems.
- Fix/Migrate custom images/scales and broken links to AT-based images.
- Metadata on brains is still old DateTime
- Fix bytes in opkapiindex
- Fix navigation_portlet (has ComputedValue for portal instead of a UUID)
Example method for final touces after migrating to 5.2 with py3
- Disable a subscriber
- Re-enable a subscriber
- Example to use the above
- Rebuild the whole catalog but skip reindexing blobs since that takes a long time.
- Pack the database
Example of a profile that removes all kinds of stuff that was added with Generic Setup.
Bonus: Fixes modal for login.
Example for some maybe sensible registry-settings for migrated sites.
This is mostly meant to copy&paste the code from here to your own packages.
Installation is still possible: To install it add it to your buildout:
[buildout] ... eggs = collective.migrationhelpers
and then running
- Issue Tracker: https://github.com/collective/collective.migrationhelpers/issues
- Source Code: https://github.com/collective/collective.migrationhelpers
The project is licensed under the GPLv2.