A generic content migration framework for Plone, which has no UI or value on its own, but should help you write your own content migrations.
Project description
Content migration utilities by Martin Aspeli <optilude@gmx.net>
Released under the GNU Lesser General Public License (LGPL) version 2.0
This is a generic content migration framework, which should help you write your own content migrations. It has no UI and no value on its own, but makes it easy to write certain type of content migrations.
This extends the ATContentTypes migration framework to provide three useful extensions:
- o A CustomQueryWalker can be used to specify a more specific catalog query
for a walker to use (e.g. which content to actually migrate). This can be used with any migrator.
- o A BaseInlineMigrator is similar to BaseMigrator, but does not migrate by
copying the old object to a temporary location, creating a new object and applying migration methods. Instead, migration methods are applied in-place. This simplifies the code significantly, because attributes, local roles etc. does not need to be copied over.
Note that whereas BaseMigrator works in terms of self.old and self.new as the objects being migrated, BaseInlineMigrator only has a single object, stored in self.obj. This can be used with any walker.
- o An extension of this class called FieldActionMigrator uses the
action-based migration framework for Archetypes fields, found in field.py. Please refer to that file for full details, but briefly, you specify a list of attributes to migrate at the storage level, instructing the migrator whether to rename, transform, unset or change the storage for an attribute.
Please see the docstrings in walker.py, migrator.py and field.py for full details. For examples, see tests/cmtc.py and tests/testATFieldMigration.py.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for Products.contentmigration-1.0b4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | eaf194231000dafcd019d2a5b2322bcc00fdec462503fbb77384a12192f8f34a |
|
MD5 | 41cecb6af21f772137fe1bb61f814c77 |
|
BLAKE2b-256 | b405e0ff09a0cd3ba56cb7c9b2bead3e64f91177a07f18264930c4815695c0e4 |
Hashes for Products.contentmigration-1.0b4-py2.4.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a5ff0c5048d4dc35856a1f7ad65ecedd48f9fd2793fd23a120333e43312afe9 |
|
MD5 | 941bbf2e477582b60918f409e2f68311 |
|
BLAKE2b-256 | 0d345646aad444ce1277ce9acfde9d2ed21875b3b64b5381e0ca699b3f5621d7 |