<configure
  xmlns="http://namespaces.zope.org/zope"
  xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
  i18n_domain="plone">

  <genericsetup:upgradeSteps
    source="2"
    destination="3"
    profile="euphorie.deployment:default"
    >

    <genericsetup:upgradeStep
      title="Correct survey workflow"
      description="Fix problems with copying and pasting of published surveys. This step may take a (very) long time."
      handler=".v2.resetSurveyWorkflow"
      />

  </genericsetup:upgradeSteps>

  <genericsetup:upgradeSteps
    source="3"
    destination="4"
    profile="euphorie.deployment:default"
    >

    <genericsetup:upgradeStep
      title="Correct publish permissions"
      description="Fix problems with country managers not being able to publish surveys."
      handler=".v2.resetPublishPermission"
      />

    <genericsetup:upgradeStep
      title="Migrate company detail data"
      description="Migrate the company data to split out NL-specific and generic company information."
      handler=".v2.migrateCompanyTable"
      />

  </genericsetup:upgradeSteps>

  <genericsetup:upgradeSteps
    source="4"
    destination="5"
    profile="euphorie.deployment:default"
    >

    <genericsetup:upgradeStep
      title="Update SQL account model"
      description="Add a terms-and-conditions column to the account table." 
      handler=".v2.addTermsAndConditionsColumn"
      />

    <genericsetup:upgradeStep
      title="Update survey workflows"
      description="This step will update the workflows and update the permissions of existing content. This may take a very long time."
      handler=".v2.updateSurveyWorkflow"
      />

  </genericsetup:upgradeSteps>

  <genericsetup:upgradeSteps
    source="5"
    destination="6"
    profile="euphorie.deployment:default"
    >

    <genericsetup:upgradeStep
      title="Add regions"
      description="This step will add new countries and regions to the CMS."
      handler=".v2.updateInitialContent"
      />

    <genericsetup:upgradeStep
      title="Add new SQL tables"
      description="This step will adds the account change table for the client, if it is missing."
      handler=".v2.addAccountChangeTable"
      />

  </genericsetup:upgradeSteps>

  <genericsetup:upgradeSteps
    source="6"
    destination="7"
    profile="euphorie.deployment:default"
    >

    <genericsetup:upgradeStep
      title="Country groupings"
      description="This step will add grouping data to existing countries."
      handler=".v2.addCountryGrouping"
      />
      
    <genericsetup:upgradeStep
      title="Add regions"
      description="This step will add new countries and regions to the CMS."
      handler=".v2.updateInitialContent"
      />
  </genericsetup:upgradeSteps>
  
  <genericsetup:upgradeSteps
    source="7"
    destination="8"
    profile="euphorie.deployment:default"
    >

    <genericsetup:upgradeStep
      title="Country groupings"
      description="This step will add grouping data to existing CMS and client countries."
      handler=".v2.addCountryGrouping"
      />
      
  </genericsetup:upgradeSteps>

  <genericsetup:upgradeSteps
    source="8"
    destination="9"
    profile="euphorie.deployment:default"
    >

    <genericsetup:upgradeStep
      title="Evaluation types"
      description="This step migrate data in preparation for multiple evaluation method support." 
      handler=".v3.set_evaluation_method_interfaces"
      />

    <genericsetup:upgradeStep
      title="Standard solutions"
      description="This step converts the solution description to plain text." 
      handler=".v3.convert_solution_description_to_text"
      />

    <genericsetup:upgradeStep
      title="New Company column: 'Workers Participated'"
      description="This step adds a new column 'workers_participated' to the company table." 
      handler=".v3.add_wp_column_to_company"
      />

    <genericsetup:upgradeStep
      title="Lowercase all client login names"
      description="This is required for the case-insensitive client logins." 
      handler=".v3.lowercase_login"/>
  </genericsetup:upgradeSteps>

  <genericsetup:upgradeSteps
    source="9"
    destination="10"
    profile="euphorie.deployment:default"
    >

    <genericsetup:upgradeStep
      title="Add description-presence column"
      description="This allows skipping modules without a description in the client."
      handler=".v3.add_has_description_column"/>
  </genericsetup:upgradeSteps>

  <genericsetup:upgradeSteps
    source="10"
    destination="11"
    profile="euphorie.deployment:default"
    >

    <genericsetup:upgradeStep
      title="Add action plan reference client"
      description="Extend action plan data for API clients."
      handler=".v4.add_actionplan_reference"/>

    <genericsetup:upgradeStep
      title="Allow empty client password"
      description="Allow the client API to create passwordless accounts."
      handler=".v4.allow_empty_password"/>

    <genericsetup:upgradeStep
      title="Configure client API authentication."
      description="Configure authentication for client API users."
      handler=".v4.enable_extra_pas_interfaces"/>

  </genericsetup:upgradeSteps>

  <genericsetup:upgradeSteps
    source="11"
    destination="12"
    profile="euphorie.deployment:default"
    >

    <genericsetup:upgradeStep
      title="Fix solution titles."
      description="Fix solution titles indexed as title_common_solution"
      handler=".v5.reindex_solution_titles"/>

    <genericsetup:upgradeStep
      title="Reindex rich text descriptions."
      description="IRichDescription fields need to be reindexed to properly catalog HTML entities."
      handler=".v5.reindex_richtext_descriptions"/>

  </genericsetup:upgradeSteps>

</configure>

