databaseChangeLog:
  - logicalFilePath: db-changelog-000331-add-db-proxy-user-map.yaml
  - changeSet:
      author: appian
      id: 'tag-pre-000331'
      tagDatabase:
        tag: 'pre-000331'
  - changeSet:
      author: appian
      id: '000331.1.0'
      comment: create db_proxy_user_map table
      changes:
        - createTable:
            tableName: db_proxy_user_map
            columns:
              - column:
                  name: id
                  type: ${longType}
                  autoIncrement: ${autoIncrement}
                  constraints:
                    nullable: false
                    primaryKey: true
              - column:
                  name: db_proxy_username
                  type: ${shortStringType}
                  constraints:
                    nullable: false
              - column:
                  name: db_username
                  type: ${shortStringType}
                  constraints:
                    nullable: false
  - changeSet:
      id: '000331.2.0'
      author: appian
      changes:
        preConditions:
          onFail: MARK_RAN
          changeLogPropertyDefined:
            property: createSequence
            value: true
        createSequence:
          sequenceName: db_proxy_user_map_sq
  - changeSet:
      author: appian
      id: '000331.3.0'
      comment: add unique constraint for db_proxy_username
      changes:
        - addUniqueConstraint:
            tableName: db_proxy_user_map
            constraintName: db_proxy_username_uc
            columnNames: db_proxy_username

