kaliop-uk / ezmigrationbundle

This bundle makes it easy to handle eZPlatform / eZPublish5 content upgrades/migrations
GNU General Public License v2.0
53 stars 81 forks source link

fields not removed when updating contentTypes #141

Closed Specthram closed 6 years ago

Specthram commented 6 years ago

Hello there, When i update my contentTypes with the command : app/console kaliop:migration:migrate, the new fields are correctly added, but the old ones are not removed (they are not defined in the yaml file). Or maybe I missed something ? Thank you :)

blankse commented 6 years ago

At the moment you must set these field identifier to the remove_attributes setting. See here: https://github.com/kaliop-uk/ezmigrationbundle/blob/master/Resources/doc/DSL/ContentTypes.yml#L174

With my PR (https://github.com/kaliop-uk/ezmigrationbundle/pull/127) it is possible to set these setting to * and remove all fields, that are not available in the update step.

gggeek commented 6 years ago

@blankse sorry for not acting on your upsert PRs, too many things in my backlog to carve enough time for such a complex issue.

In the meantime, if you would be so kind to send a separate PR for only the '*' support for the remove_attributes setting, I might be able to push out a new release next weekend...

Specthram commented 6 years ago

Thank you for your answers ! It will do the job for me, and the PR seems to great too. I just hope it keep fields ID's to prevent data lost.

gggeek commented 6 years ago

Sure, nothing of existing fields is modified.

As a side note: even without this PR, you can already remove existing fields: you just have to specify them one by one using the remove_attributes tag in your yml (as @blankse mentioned already above)

gggeek commented 6 years ago

PS: at the moment the Travis tests fail. I am almost sure that this is not related to the introduction to the new code, but rather to eZSystems having introduced a subtle bug in kernel 6.7.6. See the comment I left at https://jira.ez.no/browse/EZP-28148?focusedCommentId=218615&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-218615

gggeek commented 6 years ago

Implemented in 4.4

Specthram commented 6 years ago

@gggeek thank you :)