databaseChangeLog:
  - changeSet:
      id: create_index_if_not_exists_idx_component_mappings_dossier_template_id
      author: Timo
      preConditions:
        - onFail: MARK_RAN
        - not:
            indexExists:
              indexName: idx_component_mappings_dossier_template_id
              tableName: component_mappings
      changes:
        - createIndex:
            tableName: component_mappings
            indexName: idx_component_mappings_dossier_template_id
            columns:
              - column:
                  name: dossier_template_id

  - changeSet:
      id: create_index_if_not_exists_idx_component_mappings_dossier_template_id_name
      author: Timo
      preConditions:
        - onFail: MARK_RAN
        - not:
            indexExists:
              indexName: idx_component_mappings_dossier_template_id_name
              tableName: component_mappings
      changes:
        - createIndex:
            tableName: component_mappings
            indexName: idx_component_mappings_dossier_template_id_name
            columns:
              - column:
                  name: dossier_template_id
              - column:
                  name: name
