apiVersion: api/v1
kind: Case
name: dm_migrate_index_before_uk
features: [dm]
summary: dm test special migration
steps: |
    1. add source to dm by `operate-create source.yaml`
    2. start-task task.yaml
    3. insert sepcial schema and dml
    4. check sync diff
priority: P1
supportedVersions: ["nightly"]
tags: ["dm"]
designer: xujianxu@pingcap.com
automation: AUTOMATED
active: true
framework:
    generic:
        command:
            [
                "/bin/sh",
                "-c",
                "/dm_test_infra --workload testcases/dm_migrate_special_schema/workload.yaml --path testcases/dm_migrate_special_schema/path.yaml",
            ]
        workingDir: "/"
        env: null
        image: hub-new.pingcap.net/dm/test-infra:dm_migrate_special_schema
        imagePullPolicy: Always
parameters:
    - type: RESOURCE
      name: upstream1
      default: upstream1
    - type: RESOURCE
      name: downstream
      default: downstream
    - type: RESOURCE
      name: dm
      default: dm
    - type: RESOURCE
      name: workload
      default: workload
    - type: RESOURCE
      name: syncdiff
      default: syncdiff
    - type: STRING
      name: executeSql1
      default: |
          'create table dm_migrate_special_schema.t(a int not null, b int not null, c int not null, d int not null, e int not null, index (a), index(b), index(c));'
    - type: STRING
      name: executeSql2
      default: |
          'alter table dm_migrate_special_schema.t add unique(d); | alter table dm_migrate_special_schema.t add unique(e); | insert into dm_migrate_special_schema.t values(1,1,1,1,1);'
