databaseChangeLog:
  - logicalFilePath: db-changelog-000367-app-history-table.yaml
  - changeSet:
      author: appian
      id: 'tag-pre-000367'
      tagDatabase:
        tag: 'pre-000367'
  #----------------------------------------------------------------------------------------------------
  - changeSet:
      author: appian
      id: '000367.1.0'
      comment: Create app_edit_history table
      changes:
        - createTable:
            tableName: app_edit_history
            columns:
              - column:
                  name: id
                  type: ${longType}
                  autoIncrement: ${autoIncrement}
                  constraints:
                    nullable: false
                    primaryKey: true
              - column:
                  name: app_uuid
                  type: ${uuidType}
                  constraints:
                    nullable: false
              - column:
                  name: edit_events
                  type: ${blobType}
                  constraints:
                    nullable: false
        - createIndex:
            indexName: app_edit_hist_app_uuid_idx
            tableName: app_edit_history
            columns:
              - column:
                  name: app_uuid
  - changeSet:
      id: '000367.1.1'
      comment: Create sequence for app_edit_history
      author: appian
      changes:
        preConditions:
          onFail: MARK_RAN
          changeLogPropertyDefined:
            property: createSequence
            value: true
        createSequence:
          sequenceName: app_edit_history_sq
