databaseChangeLog:
  - logicalFilePath: db-changelog-001004-add-composer-persona-uuid.yaml
  - changeSet:
      author: appian
      id: tag-pre-001004
      tagDatabase:
        tag: 'pre-001004'

  - changeSet:
      author: appian
      id: '001004.1.0'
      comment: Add uuid column to req_capture_persona table
      addColumn:
        tableName: req_capture_persona
        columns:
          - column:
              name: uuid
              type: ${uuidType}
              constraints:
                nullable: true

  - changeSet:
      author: appian
      id: '001004.1.1'
      comment: Populate existing req_capture_persona rows with uuid
      changes:
        - customChange:
            class: com.appiancorp.requirementscapture.migration.PersonaUuidAdditionMigration

  - changeSet:
      author: appian
      id: '001004.1.2'
      comment: Add not null constraint to uuid column
      changes:
        - addNotNullConstraint:
            tableName: req_capture_persona
            columnName: uuid
            columnDataType: ${uuidType}

  - changeSet:
      author: appian
      id: '001004.1.3'
      comment: Add unique constraint to uuid column
      changes:
        - addUniqueConstraint:
            tableName: req_capture_persona
            columnNames: uuid
            constraintName: req_capture_persona_uuid_uc
