Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

2.8 KB
Raw Blame
- statement: CREATE TABLE t(a int, b int, primary key (a, b));
- statement: |-
    CREATE TABLE t(
      a int,
      b int,
      primary key pk (a, b, b, b, b, b, b),
      unique key uk (a, b, b, b, b, b, b),
      foreign key fk (a, b, b, b, b, b) references t1(a, b, b, b, b, b)
    );
  want:
    - status: 2
      code: 802
      title: INDEX_KEY_NUMBER_LIMIT
      content: The number of index `pk` in table `t` should be not greater than 5
      startposition:
        line: 4
        column: 0
      endposition: null
    - status: 2
      code: 802
      title: INDEX_KEY_NUMBER_LIMIT
      content: The number of index `uk` in table `t` should be not greater than 5
      startposition:
        line: 5
        column: 0
      endposition: null
    - status: 2
      code: 802
      title: INDEX_KEY_NUMBER_LIMIT
      content: The number of index `fk` in table `t` should be not greater than 5
      startposition:
        line: 6
        column: 0
      endposition: null
- statement: |-
    CREATE TABLE t(a int, b int, c int, d int, e int, f int, g int);
    CREATE INDEX idx ON t(a, b, c, d, e, f, g);
    CREATE UNIQUE INDEX uk ON t(a, b, c, d, e, f, g);
  want:
    - status: 2
      code: 802
      title: INDEX_KEY_NUMBER_LIMIT
      content: The number of index `idx` in table `t` should be not greater than 5
      startposition:
        line: 2
        column: 0
      endposition: null
    - status: 2
      code: 802
      title: INDEX_KEY_NUMBER_LIMIT
      content: The number of index `uk` in table `t` should be not greater than 5
      startposition:
        line: 3
        column: 0
      endposition: null
- statement: |-
    CREATE TABLE t(a int, b int, c int, d int, e int, f int, g int);
    ALTER TABLE t ADD PRIMARY KEY pk (a, b, c, d, e, f, g);
    ALTER TABLE t ADD UNIQUE KEY uk (a, b, c, d, e, f, g);
  want:
    - status: 2
      code: 802
      title: INDEX_KEY_NUMBER_LIMIT
      content: The number of index `pk` in table `t` should be not greater than 5
      startposition:
        line: 2
        column: 0
      endposition: null
    - status: 2
      code: 802
      title: INDEX_KEY_NUMBER_LIMIT
      content: The number of index `uk` in table `t` should be not greater than 5
      startposition:
        line: 3
        column: 0
      endposition: null
- statement: |-
    CREATE TABLE t(a int, b int, c int, d int, e int, f int, g int);
    ALTER TABLE t ADD FOREIGN KEY uk (a, b, c, d, e, f, g) REFERENCES t1(a, b, c, d, e, f, g)
  want:
    - status: 2
      code: 802
      title: INDEX_KEY_NUMBER_LIMIT
      content: The number of index `uk` in table `t` should be not greater than 5
      startposition:
        line: 2
        column: 0
      endposition: null
- statement: |-
    CREATE TABLE t(a int, b varchar(255));
    CREATE FULLTEXT INDEX idx ON t(b, b, b, b, b, b);