Skip to content

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

3.2 KB
Raw Blame
- statement: CREATE INDEX idx_tech_book_id_name ON tech_book(id, name)
  changeType: 1
- statement: CREATE INDEX tech_book_id_name ON tech_book(id, name)
  changeType: 1
  want:
    - status: 2
      code: 303
      title: NAMING_INDEX_IDX
      content: Index in table `tech_book` mismatches the naming convention, expect "^$|^idx_tech_book_id_name$" but found `tech_book_id_name`
      startposition:
        line: 1
        column: 0
      endposition: null
- statement: CREATE INDEX afvjwsgrbgqzjfrkmbcoxzstznuypasijbbcdykoboredqovetzfcmmqliaelyavw ON tech_book(id, name)
  changeType: 1
  want:
    - status: 2
      code: 303
      title: NAMING_INDEX_IDX
      content: Index `afvjwsgrbgqzjfrkmbcoxzstznuypasijbbcdykoboredqovetzfcmmqliaelyavw` in table `tech_book` mismatches the naming convention, its length should be within 64 characters
      startposition:
        line: 1
        column: 0
      endposition: null
    - status: 2
      code: 303
      title: NAMING_INDEX_IDX
      content: Index in table `tech_book` mismatches the naming convention, expect "^$|^idx_tech_book_id_name$" but found `afvjwsgrbgqzjfrkmbcoxzstznuypasijbbcdykoboredqovetzfcmmqliaelyavw`
      startposition:
        line: 1
        column: 0
      endposition: null
- statement: ALTER TABLE tech_book RENAME INDEX old_index TO idx_tech_book_id_name
  changeType: 1
- statement: ALTER TABLE tech_book RENAME INDEX old_index TO idx_tech_book
  changeType: 1
  want:
    - status: 2
      code: 303
      title: NAMING_INDEX_IDX
      content: Index in table `tech_book` mismatches the naming convention, expect "^$|^idx_tech_book_id_name$" but found `idx_tech_book`
      startposition:
        line: 1
        column: 0
      endposition: null
- statement: ALTER TABLE tech_book ADD INDEX idx_tech_book_id_name (id, name)
  changeType: 1
- statement: ALTER TABLE tech_book ADD INDEX tech_book_id_name (id, name)
  changeType: 1
  want:
    - status: 2
      code: 303
      title: NAMING_INDEX_IDX
      content: Index in table `tech_book` mismatches the naming convention, expect "^$|^idx_tech_book_id_name$" but found `tech_book_id_name`
      startposition:
        line: 1
        column: 0
      endposition: null
- statement: CREATE TABLE tech_book_copy(id INT PRIMARY KEY, name VARCHAR(20), INDEX idx_tech_book_copy_name (name))
  changeType: 1
- statement: CREATE TABLE tech_book_copy(id INT PRIMARY KEY, name VARCHAR(20), INDEX (name))
  changeType: 1
# Pins omni's ATAddConstraint vs ATAddIndex split: pingcap collapsed both
# `ADD INDEX` (above) and `ADD CONSTRAINT name INDEX` (below) into
# AlterTableAddConstraint, but omni preserves the syntactic distinction.
# The advisor's switch covers both arms — these cases prove the
# ATAddConstraint+ConstrIndex path is exercised, not just ATAddIndex.
- statement: ALTER TABLE tech_book ADD CONSTRAINT idx_tech_book_id_name INDEX (id, name)
  changeType: 1
- statement: ALTER TABLE tech_book ADD CONSTRAINT bad_idx INDEX (id, name)
  changeType: 1
  want:
    - status: 2
      code: 303
      title: NAMING_INDEX_IDX
      content: Index in table `tech_book` mismatches the naming convention, expect "^$|^idx_tech_book_id_name$" but found `bad_idx`
      startposition:
        line: 1
        column: 0
      endposition: null