databaseChangeLog:
  - changeSet:
      id: technical-name-change-constraint
      author: maverick
      changes:
        - addUniqueConstraint:
            constraintName: uq_technical_name
            tableName: legal_basis_mapping_entity_legal_basis
            columnNames: technical_name, legal_basis_mapping_entity_dossier_template_id
  - changeSet:
      id: technical-name-change-index
      author: maverick
      preConditions:
        - not:
            indexExists:
              indexName: idx_legal_basis_mapping_entity_dossier_template_id
              tableName: legal_basis_mapping_entity_legal_basis
      changes:
        - createIndex:
            indexName: idx_legal_basis_mapping_entity_dossier_template_id
            tableName: legal_basis_mapping_entity_legal_basis
            columns:
              - column:
                  name: legal_basis_mapping_entity_dossier_template_id
  - changeSet:
      id: custom-technical-name-change
      author: maverick
      changes:
        - customChange:
            class: com.iqser.red.service.persistence.management.v1.processor.migration.liquibase.TechnicalNameChange
