Use obj.Schema() instead of obj.schema in the migration process #6

Merged
merged 1 commit into from Mar 21, 2013

Conversation

Projects
None yet
3 participants
Member

gbastien commented Mar 20, 2013

Use obj.Schema() instead of obj.schema or some fields (like the ones provided by archetypes.schemaextender) are not taken into account...

All tests still pass, thank you for merging ;-)

Gauthier

@gbastien gbastien Update migrations.py
Use obj.Schema() instead of obj.schema or some fields (like the ones provided by archetypes.schemaextender) are not taken into account...
f57656e

@garbas garbas added a commit that referenced this pull request Mar 21, 2013

@garbas garbas Merge pull request #6 from gbastien/master
Use obj.Schema() instead of obj.schema in the migration process
7d3871f

@garbas garbas merged commit 7d3871f into plone:master Mar 21, 2013

Contributor

frisi commented on f57656e Nov 25, 2014

this change unfortunately breaks the pattern that is suggested by the doucmentation to migrate existing image and file-fields to blobstorage.

the documentation suggests to add a schemaextender that uses a blob-field and this migrator is meant to access the old field.
see https://plone.org/documentation/manual/upgrade-guide/version/upgrading-plone-3-x-to-4.0/updating-add-on-products-for-plone-4.0/use-plone.app.blob-based-blob-storage

with this change, the migrator copies empty blob files.

@gbastien i think this change should be reverted.

people that need to migrate fields defined via schemaextender to blobstorage need to write their own migration anyway since this plone.app.blob.migrations.migrate won't do the trick in this case anyway

Member

gbastien replied Nov 25, 2014

Hi @frisi

ok, if it is relevant regarding the documentation, then you can revert the change so it fits.

Maybe commenting the line and adding a relevant comment could be usefull? Or maybe it is possible to avoid to copy empty blob files by adding some check?

Contributor

frisi replied Nov 25, 2014

thanks for your reply @gbastien - i created a pull request #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment