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, c int, unique key(a, b, c))
  changeType: 1
- statement: CREATE INDEX idx_id_name on tech_book(id, name)
  changeType: 1
- statement: |-
    CREATE INDEX idx_id_name_1 on tech_book(id, name);
    CREATE INDEX idx_id_name_2 on tech_book(id, name);
    CREATE INDEX idx_id_name_3 on tech_book(id, name);
    CREATE INDEX idx_id_name_4 on tech_book(id, name);
    CREATE INDEX idx_id_name_5 on tech_book(id, name);
  changeType: 1
  want:
    - status: 2
      code: 813
      title: INDEX_TOTAL_NUMBER_LIMIT
      content: The count of index in table `tech_book` should be no more than 5, but found 8
      startposition:
        line: 5
        column: 0
      endposition: null
- statement: |-
    CREATE TABLE t(a int PRIMARY KEY, b int, c int);
    CREATE INDEX idx_a_b_1 on t(a, b);
    CREATE INDEX idx_a_b_2 on t(a, b);
    CREATE INDEX idx_a_b_3 on t(a, b);
    CREATE INDEX idx_a_b_4 on t(a, b);
    CREATE INDEX idx_a_b_5 on t(a, b);
  changeType: 1
  want:
    - status: 2
      code: 813
      title: INDEX_TOTAL_NUMBER_LIMIT
      content: The count of index in table `t` should be no more than 5, but found 6
      startposition:
        line: 6
        column: 0
      endposition: null
- statement: |-
    CREATE TABLE t(
      a int PRIMARY KEY,
      b int,
      c int,
      INDEX idx_a_b_1 (a, b),
      INDEX idx_a_b_2 (a, b),
      INDEX idx_a_b_3 (a, b),
      INDEX idx_a_b_4 (a, b),
      INDEX idx_a_b_5 (a, b));
  changeType: 1
  want:
    - status: 2
      code: 813
      title: INDEX_TOTAL_NUMBER_LIMIT
      content: The count of index in table `t` should be no more than 5, but found 6
      startposition:
        line: 1
        column: 0
      endposition: null
# Batch 17: ALTER TABLE ADD UNIQUE KEY pin — exercises ATAddConstraint
# arm with omni ConstrUnique (cumulative #2 unified). tech_book has 1
# index in mock catalog; adding 1 unique key touches lineForTable[t];
# FinalMetadata is consulted for total count. Whether this fires
# depends on FinalMetadata's count (set by test scaffolding). This
# pin documents the touch path even if the catalog count doesn't
# exceed maximum in the default mock — purpose is to verify the
# ATAddConstraint arm registers the table touch correctly without
# panic / crash on omni's unified ConstrUnique enum.
- statement: ALTER TABLE tech_book ADD UNIQUE KEY uk_id (id)
  changeType: 1
# Batch 17: ALTER TABLE ADD COLUMN with inline PRIMARY KEY pin —
# exercises the ATAddColumn arm's omniColumnCreatesIndex check on
# column.Constraints[*].Type==ColConstrPrimaryKey. Cumulative #2
# vicinity: pre-omni used ColumnOptionPrimaryKey on the column's
# Options list; omni represents this on column.Constraints (typed
# list with ColConstrPrimaryKey).
- statement: ALTER TABLE tech_book ADD COLUMN new_pk int PRIMARY KEY
  changeType: 1