<?xml version="1.0"?>
<component name="org.nuxeo.ecm.platform.comment.manager.migrator.override">

  <require>org.nuxeo.ecm.platform.comment.manager.migrator</require>

  <extension point="configuration" target="org.nuxeo.runtime.migration.MigrationService">

    <migration id="comment-storage">
      <description label="migration.comment-storage">Migration of the comment storage model</description>
      <class>org.nuxeo.ecm.platform.comment.impl.CommentsMigrator</class>
      <defaultState>secured</defaultState>
      <state id="property">
        <description label="migration.comment-storage.property">Comments stored with their parent id as property
        </description>
      </state>
      <state id="secured">
        <description label="migration.comment-storage.secured">Comments stored under the commented document
        </description>
      </state>

      <step fromState="property" id="property-to-secured" toState="secured">
        <description label="migration.comment-storage.property-to-secured">Migrate comments under the commented document
        </description>
      </step>
    </migration>

  </extension>

</component>
