<configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
    xmlns:upgrade-step="http://namespaces.zope.org/ftw.upgrade">

    <include package="ftw.upgrade" file="meta.zcml" />

    <!-- 0.1 -> 0.2 -->
    <genericsetup:upgradeStep
        title="Change navigation for existing books"
        source="0.1"
        destination="0.2"
        handler="ftw.book.upgrades.to0002.update_navigation"
        profile="ftw.book:default"
        />

    <!-- 0.2 -> 0.3 -->
    <genericsetup:upgradeStep
        title="Migration classes of chapter objects, remove old actions from chapter, set book layout"
        source="0.2"
        destination="0.3"
        handler="ftw.book.upgrades.to0003.run_upgrades"
        profile="ftw.book:default"
        />

    <!-- 0.3 -> 2.2 -->
    <genericsetup:upgradeStep
        title="Migrate book metadata to attribute storage."
        source="0.3"
        destination="2.2"
        handler="ftw.book.upgrades.to0220.migrate_book_storage"
        profile="ftw.book:default"
        />

    <!-- 2.2 -> 2200 -->
    <genericsetup:upgradeStep
        title="Make blocks searchable."
        description=""
        source="2.2"
        destination="2200"
        handler="ftw.book.upgrades.to2200.MakeBlocksSearchable"
        profile="ftw.book:default"
        />

    <genericsetup:registerProfile
        name="2200"
        title="ftw.book.upgrades.2200"
        description=""
        directory="profiles/2200"
        for="Products.CMFPlone.interfaces.IMigratingPloneSiteRoot"
        provides="Products.GenericSetup.interfaces.EXTENSION"
        />


    <!-- 2200 -> 2201 -->
    <genericsetup:upgradeStep
        title="Fix broken navigation portlets of moved books."
        description=""
        source="2200"
        destination="2201"
        handler="ftw.book.upgrades.to2201.SetBookPortlets"
        profile="ftw.book:default"
        />

    <!-- 2201 -> 2300 -->
    <genericsetup:upgradeStep
        title="Add hideFromTOC to catalog metadata (no reindex required)"
        description=""
        source="2201"
        destination="2300"
        handler="ftw.book.upgrades.to2300.UpdateCatalogMetadata"
        profile="ftw.book:default"
        />

    <genericsetup:registerProfile
        name="2300"
        title="ftw.book.upgrades.2300"
        description=""
        directory="profiles/2300"
        for="Products.CMFPlone.interfaces.IMigratingPloneSiteRoot"
        provides="Products.GenericSetup.interfaces.EXTENSION"
        />

    <!-- 2300 -> 2301 -->
    <genericsetup:upgradeStep
        title="Allow Contributors to add tables by default."
        description=""
        source="2300"
        destination="2301"
        handler="ftw.book.upgrades.to2301.UpdateRolemap"
        profile="ftw.book:default"
        />

    <genericsetup:registerProfile
        name="2301"
        title="ftw.book.upgrades.2301"
        description=""
        directory="profiles/2301"
        for="Products.CMFPlone.interfaces.IMigratingPloneSiteRoot"
        provides="Products.GenericSetup.interfaces.EXTENSION"
        />

    <!-- 2301 -> 3000 -->
    <genericsetup:upgradeStep
        title="Migrate sl Paragraph type with BookTextBlock"
        description=""
        source="2301"
        destination="3000"
        handler="ftw.book.upgrades.to3000.MigrateParagraphs"
        profile="ftw.book:default"
        />

    <genericsetup:registerProfile
        name="3000"
        title="ftw.book.upgrades.3000"
        description=""
        directory="profiles/3000"
        for="Products.CMFPlone.interfaces.IMigratingPloneSiteRoot"
        provides="Products.GenericSetup.interfaces.EXTENSION"
        />

    <!-- 3000 => 3001 -->
    <upgrade-step:importProfile
        title="Install tinymce keyword plugin"
        profile="ftw.book:default"
        source="3000"
        destination="3001"
        directory="profiles/3001"
        />

    <!-- 3001 => 3002 -->
    <genericsetup:upgradeStep
        title="Install book keyword index and metadata."
        description=""
        source="3001"
        destination="3002"
        handler="ftw.book.upgrades.to3002.AddBookKeyword"
        profile="ftw.book:default"
        />

    <genericsetup:registerProfile
        name="3002"
        title="ftw.book.upgrades.3002"
        description=""
        directory="profiles/3002"
        for="Products.CMFPlone.interfaces.IMigratingPloneSiteRoot"
        provides="Products.GenericSetup.interfaces.EXTENSION"
        />

    <!-- 3002 => 3003 -->
    <upgrade-step:importProfile
        title="Register new keywords tab."
        profile="ftw.book:default"
        source="3002"
        destination="3003"
        directory="profiles/3003"
        />

    <!-- 3003 => 3004 -->
    <upgrade-step:importProfile
        title="Register BookTextBlock as linkable in TinyMCE."
        profile="ftw.book:default"
        source="3003"
        destination="3004"
        directory="profiles/3004"
        />

    <!-- 3004 => 3005 -->
    <upgrade-step:importProfile
        title="Install ftw.contentpage and make ListingBlock available in books"
        profile="ftw.book:default"
        source="3004"
        destination="3005"
        directory="profiles/3005"
        />

    <!-- 3005 -> 3006 -->
    <genericsetup:upgradeStep
        title="Migrate HTML Block class."
        description=""
        source="3005"
        destination="3006"
        handler="ftw.book.upgrades.to3006.MigrateHTMLBlock"
        profile="ftw.book:default"
        />

    <!-- 3006 -> 3007 -->
    <genericsetup:upgradeStep
        title="Migrate Remark class."
        description=""
        source="3006"
        destination="3007"
        handler="ftw.book.upgrades.to3007.MigrateRemark"
        profile="ftw.book:default"
        />

    <!-- 3007 => 3008 -->
    <upgrade-step:importProfile
        title="Register new 'Add Chapter' permission."
        profile="ftw.book:default"
        source="3007"
        destination="3008"
        directory="profiles/3008"
        />

    <!-- 3008 => 3009 -->
    <upgrade-step:importProfile
        title="Change HTMLBlock icon."
        profile="ftw.book:default"
        source="3008"
        destination="3009"
        directory="profiles/3009"
        />

    <!-- 3009 => 3010 -->
    <upgrade-step:importProfile
        title="Add footnote plugin."
        profile="ftw.book:default"
        source="3009"
        destination="3010"
        directory="profiles/3010"
        />

    <upgrade-step:directory
        profile="ftw.book:default"
        directory="."
        />

</configure>
