Skip to content

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

1.7 KB
Raw Blame
- statement: |-
    CREATE TABLE t (
      id INT PRIMARY KEY,
      name VARCHAR(100) NOT NULL,
      age INT,
      address VARCHAR
    );
  changeType: 1
  want:
    - status: 2
      code: 402
      title: COLUMN_NO_NULL
      content: Column AGE is nullable, which is not allowed.
      startposition:
        line: 4
        column: 0
      endposition: null
    - status: 2
      code: 402
      title: COLUMN_NO_NULL
      content: Column ADDRESS is nullable, which is not allowed.
      startposition:
        line: 5
        column: 0
      endposition: null
- statement: |-
    CREATE TABLE t (
      id INT,
      name VARCHAR(100) NOT NULL,
      age INT,
      address VARCHAR,
      PRIMARY KEY (id, age)
    )
  changeType: 1
  want:
    - status: 2
      code: 402
      title: COLUMN_NO_NULL
      content: Column ADDRESS is nullable, which is not allowed.
      startposition:
        line: 5
        column: 0
      endposition: null
- statement: |-
    CREATE TABLE t (
      id INT NOT NULL,
      name VARCHAR(100) NOT NULL,
      age INT NOT NULL,
      address VARCHAR NOT NULL
    );
  changeType: 1
- statement: ALTER TABLE a ADD COLUMN age INT;
  changeType: 1
  want:
    - status: 2
      code: 402
      title: COLUMN_NO_NULL
      content: Column AGE is nullable, which is not allowed.
      startposition:
        line: 1
        column: 0
      endposition: null
- statement: ALTER TABLE a ADD COLUMN age INT NOT NULL;
  changeType: 1
- statement: ALTER TABLE a ALTER COLUMN age DROP NOT NULL;
  changeType: 1
  want:
    - status: 2
      code: 402
      title: COLUMN_NO_NULL
      content: Column AGE is nullable, which is not allowed.
      startposition:
        line: 1
        column: 0
      endposition: null