Author: Martin Aspeli (and others)


        Content migration utilities

by Martin Aspeli <> and others

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 replaces the ATContentTypes migration framework, and provide three useful

* 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.

* 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 as
  the objects being migrated, BaseInlineMigrator only has a single object,
  stored in self.obj. This can be used with any walker.

* An extension of this class called FieldActionMigrator uses the
  action-based migration framework for Archetypes fields, found in
  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, and for full
details. For examples, see tests/ and tests/


2.1.8 (2014-04-14)

- Changed all old-style to new-style classes for easier method overloading from
  derived classes.

2.1.7 (2014-01-27)

- Nothing changed yet.

2.1.6 (2013-09-23)

- Unlock items with webdav.

2.1.5 (2013-07-15)

- Keep redirections from when migrating.

2.1.4 (2013-04-06)

- Default to position 0 if folder position is not assigned.
  [kroman0, pbauer]

2.1.3 (2013-03-05)

- Modify UIDMigrator so that it also works for items which
  provides IMutableUUID.

2.1.2 (2012-12-21)

- When Joe is the Creator of an object and Jane is the Owner, make
  sure Joe stays the Creator after migrating.

2.1.1 (2012-04-15)

- Migrate marker interfaces.

- Migrate extension fields too (archetypes.schemaextender).

- Use obj.__parent__ instead of obj getParentNode() for Zope trunk

2.1.0 (2011-10-06)

- Add support for a `limit` option for the catalog based walkers, so it only
  tries to load up to `limit` items at a time, defaulting to no limit.

- Catch attribute errors during `brain.getObject` and log them instead of
  breaking the upgrade.

2.0.3 (2011-08-11)

- Undo patch correctly

2.0.2 (2011-08-10)

- Fix migration for folder containing an object (which is often the case) by patching the 'notifyWorkflowCreated' method on WorkflowAware class

- Fix for folderish items, also use ATItemMigratorMixin

- Add local buildout config

- Use module name, not the full file path, to register with the logging module.

2.0.1 - 2010-12-08

- Unlock locked objects prior to migrating them.

2.0 - 2010-07-18

- No changes.

2.0b1 - 2010-06-13

- Avoid deprecation warnings under Zope 2.13.

- Added support for archetypes.schemaextender >= 2.0 and disable the schema
  cache during migrations.

2.0a3 - 2009-11-15

- Fix issue with my adjustment to the _