Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: delete backend/api/v1/testdata directory (#19446)
h3n4l8ede991ff799
diff --git a/backend/api/v1/testdata/branch_merge/try_merge.yaml b/backend/api/v1/testdata/branch_merge/try_merge.yamldeleted file mode 100644index dc45dffbb1..0000000000--- a/backend/api/v1/testdata/branch_merge/try_merge.yaml+++ /dev/null@@ -1,1339 +0,0 @@-- description: ""- ancestor: |-- {- "schemas": [- {- "tables": [- {- "name": "t",- "engine": "InnoDB",- "columns": [- {- "name": "id",- "type": "int",- "nullable": true,- "defaultNull": true- }- ],- "dataSize": "16384",- "collation": "utf8mb4_0900_ai_ci"- }- ],- "functions": [- {- "name": "CalcIncome2",- "definition": "CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome2`( starting_value INT ) RETURNS int(11)\n DETERMINISTIC\nBEGIN\n\n DECLARE income INT;\n\n SET income = 0;\n\n label1: WHILE income <= 3000 DO\n SET income = income + starting_value;\n END WHILE label1;\n\n RETURN income;\n\nEND"- },- {- "name": "CalcIncome3",- "definition": "CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome3`( starting_value INT ) RETURNS int(11)\n DETERMINISTIC\nBEGIN\n\n DECLARE income INT;\n\n SET income = 0;\n\n label1: WHILE income <= 3000 DO\n SET income = income + starting_value;\n END WHILE label1;\n\n RETURN income;\n\nEND"- }- ]- }- ]- }- head: |-- {- "schemas": [- {- "views": [- {- "name": "v1",- "comment": "VIEW",- "definition": "select `t`.`id` AS `id` from `t`"- }- ],- "tables": [- {- "name": "t",- "engine": "InnoDB",- "columns": [- {- "name": "id",- "type": "int",- "nullable": true,- "defaultNull": true- }- ],- "dataSize": "16384",- "collation": "utf8mb4_0900_ai_ci"- }- ],- "functions": [- {- "name": "CalcIncome2",- "definition": "CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome2`( starting_value INT ) RETURNS int(11)\n DETERMINISTIC\nBEGIN\n\n DECLARE income INT;\n\n SET income = 0;\n\n label1: WHILE income <= 3000 DO\n SET income = income + starting_value;\n END WHILE label1;\n\n RETURN income;\n\nEND"- },- {- "name": "CalcIncome3",- "definition": "CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome3`( starting_value INT ) RETURNS int(11)\n DETERMINISTIC\nBEGIN\n\n DECLARE income INT;\n\n SET income = 0;\n\n label1: WHILE income <= 3000 DO\n SET income = income + starting_value;\n END WHILE label1;\n\n RETURN income;\n\nEND"- }- ]- }- ]- }- base: |-- {- "schemas": [- {- "tables": [- {- "name": "t",- "engine": "InnoDB",- "columns": [- {- "name": "id",- "type": "int",- "nullable": true,- "defaultNull": true- }- ],- "dataSize": "16384",- "collation": "utf8mb4_0900_ai_ci"- }- ],- "functions": [- {- "name": "CalcIncome",- "definition": "CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome`( starting_value INT ) RETURNS int(11)\n DETERMINISTIC\nBEGIN\n\n DECLARE income INT;\n\n SET income = 0;\n\n label1: WHILE income <= 3000 DO\n SET income = income + starting_value;\n END WHILE label1;\n\n RETURN income;\n\nEND"- },- {- "name": "CalcIncome2",- "definition": "CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome2`( starting_value INT ) RETURNS int(11)\n DETERMINISTIC\nBEGIN\n\n DECLARE income INT;\n\n SET income = 0;\n\n label1: WHILE income <= 3000 DO\n SET income = income + starting_value;\n END WHILE label1;\n\n RETURN income;\n\nEND"- }- ],- "procedures": [- {- "name": "citycount",- "definition": "CREATE DEFINER=`root`@`%` PROCEDURE `citycount`(IN country CHAR(3), OUT cities INT)\nBEGIN\n SELECT 1000 INTO cities;\n END"- }- ]- }- ]- }- expected: |-- {- "schemas": [- {- "tables": [- {- "name": "t",- "columns": [- {- "name": "id",- "defaultNull": true,- "nullable": true,- "type": "int"- }- ],- "engine": "InnoDB",- "collation": "utf8mb4_0900_ai_ci",- "dataSize": "16384"- }- ],- "views": [- {- "name": "v1",- "definition": "select `t`.`id` AS `id` from `t`"- }- ],- "functions": [- {- "name": "CalcIncome2",- "definition": "CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome2`( starting_value INT ) RETURNS int(11)\n DETERMINISTIC\nBEGIN\n\n DECLARE income INT;\n\n SET income = 0;\n\n label1: WHILE income <= 3000 DO\n SET income = income + starting_value;\n END WHILE label1;\n\n RETURN income;\n\nEND"- },- {- "name": "CalcIncome",- "definition": "CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome`( starting_value INT ) RETURNS int(11)\n DETERMINISTIC\nBEGIN\n\n DECLARE income INT;\n\n SET income = 0;\n\n label1: WHILE income <= 3000 DO\n SET income = income + starting_value;\n END WHILE label1;\n\n RETURN income;\n\nEND"- }- ],- "procedures": [- {- "name": "citycount",- "definition": "CREATE DEFINER=`root`@`%` PROCEDURE `citycount`(IN country CHAR(3), OUT cities INT)\nBEGIN\n SELECT 1000 INTO cities;\n END"- }- ]- }- ]- }-- description: |-- Add Partition:- Head:- - Table `employee`:- - ADD PARTITION `p2` VALUES LESS THAN (20).- - ADD PARTITION `p3` VALUES LESS THAN (30).- - ADD PARTITION `p4` VALUES LESS THAN (40).- Base:- - Table `employee`:- - ADD PARTITION `p2` VALUES LESS THAN (20).- - ADD PARTITION `p3` VALUES LESS THAN (30).- - ADD PARTITION `p4` VALUES LESS THAN (40).- - ADD PARTITION `p5` VALUES LESS THAN (50).- What we expect:- - Table `employee`:- - ADD PARTITION `p2` VALUES LESS THAN (20).- - ADD PARTITION `p3` VALUES LESS THAN (30).- - ADD PARTITION `p4` VALUES LESS THAN (40).- - ADD PARTITION `p5` VALUES LESS THAN (50).- ancestor: |-- {- "schemas": [- {- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "defaultNull": true,- "nullable": true,- "type": "INT"- }- ],- "indexes": [- {- "name": "PRIMARY",- "expressions": [- "id"- ],- "keyLength": [- "-1"- ],- "unique": true,- "primary": true,- "visible": true- }- ],- "partitions": [- {- "name": "p1",- "type": "RANGE",- "expression": "`id`",- "value": "10 "- }- ]- }- ]- }- ]- }- head: |-- {- "schemas": [- {- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "defaultNull": true,- "nullable": true,- "type": "INT"- }- ],- "indexes": [- {- "name": "PRIMARY",- "expressions": [- "id"- ],- "keyLength": [- "-1"- ],- "unique": true,- "primary": true,- "visible": true- }- ],- "partitions": [- {- "name": "p1",- "type": "RANGE",- "expression": "`id`",- "value": "10 "- },- {- "name": "p2",- "type": "RANGE",- "expression": "`id`",- "value": "20 "- },- {- "name": "p3",- "type": "RANGE",- "expression": "`id`",- "value": "30 "- },- {- "name": "p4",- "type": "RANGE",- "expression": "`id`",- "value": "40 "- }- ]- }- ]- }- ]- }- base: |-- {- "schemas": [- {- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "defaultNull": true,- "nullable": true,- "type": "INT"- }- ],- "indexes": [- {- "name": "PRIMARY",- "expressions": [- "id"- ],- "keyLength": [- "-1"- ],- "unique": true,- "primary": true,- "visible": true- }- ],- "partitions": [- {- "name": "p1",- "type": "RANGE",- "expression": "`id`",- "value": "10 "- },- {- "name": "p2",- "type": "RANGE",- "expression": "`id`",- "value": "20 "- },- {- "name": "p3",- "type": "RANGE",- "expression": "`id`",- "value": "30 "- },- {- "name": "p4",- "type": "RANGE",- "expression": "`id`",- "value": "40 "- },- {- "name": "p5",- "type": "RANGE",- "expression": "`id`",- "value": "50 "- }- ]- }- ]- }- ]- }- expected: |-- {- "schemas": [- {- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "defaultNull": true,- "nullable": true,- "type": "INT"- }- ],- "indexes": [- {- "name": "PRIMARY",- "expressions": [- "id"- ],- "keyLength": [- "-1"- ],- "unique": true,- "primary": true,- "visible": true- }- ],- "partitions": [- {- "name": "p1",- "type": "RANGE",- "expression": "`id`",- "value": "10 "- },- {- "name": "p2",- "type": "RANGE",- "expression": "`id`",- "value": "20 "- },- {- "name": "p3",- "type": "RANGE",- "expression": "`id`",- "value": "30 "- },- {- "name": "p4",- "type": "RANGE",- "expression": "`id`",- "value": "40 "- },- {- "name": "p5",- "type": "RANGE",- "expression": "`id`",- "value": "50 "- }- ]- }- ]- }- ]- }-- description: |-- Complex Case:- Head:- - Table `employee`:- - DROP COLUMN `name`.- - ADD COLUMN `gender char(1)`.- - ADD COLUMN `credit_card_number VARCHAR(255)`.- - DROP INDEX `t_c_uniq_idx`.- - Table `salary`:- - DROP TABLE `salary`.- - Table `address`:- - CREATE TABLE `address` (id INT PRIMARY KEY, employee_id INT REFERENCES employee(id)).-- Base:- - Table `employee`:- - ADD COLUMN `gender char(1)`.- - ADD COLUMN `debit_card_number VARCHAR(255)`.- - DROP INDEX `t_c_plus_5_uniq_idx` and CREATE INDEX `t_c_plus_5_uniq_idx` to make it UNIQUE.- - Table `salary`:- - NO CHANGE.- - Table `hiring_date`:- - CREATE TABLE `hiring_date`(id INT, employee_id INT).- - Table `address`:- - CREATE TABLE `address` (id INT PRIMARY KEY, address VARCHAR(255), employee_id INT REFERENCES employee(id)).-- What we expect:- - Table `employee`:- - DROP COLUMN `name`.- - ADD COLUMN `gender char(1)`.- - ADD COLUMN `debit_card_number VARCHAR(255)`.- - ADD COLUMN `credit_card_number VARCHAR(255)`.- - DROP INDEX `t_c_uniq_idx`.- - DROP INDEX `t_c_plus_5_uniq_idx` and CREATE INDEX `t_c_plus_5_uniq_idx` to make it UNIQUE.- - Table `salary`:- - DROP TABLE `salary`.- - Table `hiring_date`:- - CREATE TABLE `hiring_date`(id INT, employee_id INT).- - Table `address`:- - CREATE TABLE `address` (id INT PRIMARY KEY, address VARCHAR(255), employee_id INT REFERENCES employee(id)).- ancestor: |-- {- "schemas": [- {- "name": "public",- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "type": "integer"- },- {- "name": "name",- "type": "varchar(255)"- },- {- "name": "c",- "type": "int"- }- ],- "indexes": [- {- "name": "PRIMARY",- "expressions": [- "id"- ],- "type": "btree",- "unique": true,- "primary": true- },- {- "name": "t_c_uniq_idx",- "expressions": [- "c"- ],- "unique": true,- "visible": true- },- {- "name": "t_c_plus_5_uniq_idx",- "expressions": [- "((`c` + 5))"- ],- "visible": true- }- ],- "indexSize": "8192"- },- {- "name": "salary",- "columns": [- {- "name": "id",- "type": "integer"- }- ]- }- ]- }- ],- "characterSet": "UTF8",- "collation": "en_US.utf8"- }- head: |-- {- "schemas": [- {- "name": "public",- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "type": "integer"- },- {- "name": "c",- "type": "int"- },- {- "name": "gender",- "type": "char(1)"- },- {- "name": "credit_card_number",- "type": "varchar(255)"- }- ],- "indexes": [- {- "name": "PRIMARY",- "expressions": [- "id"- ],- "type": "btree",- "unique": true,- "primary": true- },- {- "name": "t_c_plus_5_uniq_idx",- "expressions": [- "((`c` + 5))"- ],- "visible": true- }- ],- "indexSize": "8192"- },- {- "name": "address",- "columns": [- {- "name": "id",- "type": "integer"- },- {- "name": "employee_id",- "type": "integer"- }- ],- "indexes": [- {- "name": "PRIMARY",- "expressions": [- "id"- ],- "primary": true- }- ],- "foreignKeys": [- {- "name": "address-fk-sc4rcmkp",- "columns": [- "employee_id"- ],- "referencedSchema": "public",- "referencedTable": "employee",- "referencedColumns": [- "id"- ]- }- ]- }- ]- }- ],- "characterSet": "UTF8",- "collation": "en_US.utf8"- }- base: |-- {- "schemas": [- {- "name": "public",- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "type": "integer"- },- {- "name": "name",- "type": "varchar(255)"- },- {- "name": "c",- "type": "int"- },- {- "name": "gender",- "type": "char(1)"- },- {- "name": "debit_card_number",- "type": "varchar(255)"- }- ],- "indexes": [- {- "name": "PRIMARY",- "expressions": [- "id"- ],- "type": "btree",- "unique": true,- "primary": true- },- {- "name": "t_c_plus_5_uniq_idx",- "expressions": [- "((`c` + 5))"- ],- "unique": true,- "visible": true- }- ],- "indexSize": "8192"- },- {- "name": "salary",- "columns": [- {- "name": "id",- "type": "integer"- }- ]- },- {- "name": "hiring_date",- "columns": [- {- "name": "id",- "type": "integer"- },- {- "name": "employee_id",- "type": "integer"- }- ]- },- {- "name": "address",- "columns": [- {- "name": "id",- "type": "integer"- },- {- "name": "address",- "type": "varchar(255)"- },- {- "name": "employee_id",- "type": "integer"- }- ],- "indexes": [- {- "name": "PRIMARY",- "expressions": [- "id"- ],- "primary": true- }- ],- "foreignKeys": [- {- "name": "address-fk-sc4rcmkp",- "columns": [- "employee_id"- ],- "referencedSchema": "public",- "referencedTable": "employee",- "referencedColumns": [- "id"- ]- }- ]- }- ]- }- ],- "characterSet": "UTF8",- "collation": "en_US.utf8"- }- expected: |-- {- "schemas": [- {- "name": "public",- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "type": "integer"- },- {- "name": "c",- "type": "int"- },- {- "name": "gender",- "type": "char(1)"- },- {- "name": "debit_card_number",- "type": "varchar(255)"- },- {- "name": "credit_card_number",- "type": "varchar(255)"- }- ],- "indexes": [- {- "name": "PRIMARY",- "expressions": [- "id"- ],- "type": "btree",- "unique": true,- "primary": true- },- {- "name": "t_c_plus_5_uniq_idx",- "expressions": [- "((`c` + 5))"- ],- "unique": true,- "visible": true- }- ]- },- {- "name": "address",- "columns": [- {- "name": "id",- "type": "integer"- },- {- "name": "address",- "type": "varchar(255)"- },- {- "name": "employee_id",- "type": "integer"- }- ],- "indexes": [- {- "name": "PRIMARY",- "expressions": [- "id"- ],- "primary": true- }- ],- "foreignKeys": [- {- "name": "address-fk-sc4rcmkp",- "columns": [- "employee_id"- ],- "referencedSchema": "public",- "referencedTable": "employee",- "referencedColumns": [- "id"- ]- }- ]- },- {- "name": "hiring_date",- "columns": [- {- "name": "id",- "type": "integer"- },- {- "name": "employee_id",- "type": "integer"- }- ]- }- ]- }- ],- "characterSet": "UTF8",- "collation": "en_US.utf8"- }-- description: Add different column on the same table- ancestor: |-- {- "schemas": [- {- "name": "public",- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "type": "integer"- }- ]- }- ]- }- ],- "characterSet": "UTF8",- "collation": "en_US.utf8"- }- head: |-- {- "schemas": [- {- "name": "public",- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "type": "integer"- },- {- "name": "name",- "type": "varchar(255)"- }- ]- }- ]- }- ],- "characterSet": "UTF8",- "collation": "en_US.utf8"- }- base: |-- {- "schemas": [- {- "name": "public",- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "type": "integer"- },- {- "name": "gender",- "type": "char(1)"- }- ]- }- ]- }- ],- "characterSet": "UTF8",- "collation": "en_US.utf8"- }- expected: |-- {- "schemas": [- {- "name": "public",- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "type": "integer"- },- {- "name": "gender",- "type": "char(1)"- },- {- "name": "name",- "type": "varchar(255)"- }- ]- }- ]- }- ],- "characterSet": "UTF8",- "collation": "en_US.utf8"- }-- description: Add index in base- ancestor: |-- {- "schemas": [- {- "name": "public",- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "type": "integer"- },- {- "name": "name",- "type": "text"- }- ]- }- ]- }- ],- "characterSet": "UTF8",- "collation": "en_US.utf8"- }- head: |-- {- "schemas": [- {- "name": "public",- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "type": "integer"- },- {- "name": "name",- "type": "text"- }- ]- }- ]- }- ],- "characterSet": "UTF8",- "collation": "en_US.utf8"- }- base: |-- {- "schemas": [- {- "name": "public",- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "type": "integer"- },- {- "name": "name",- "type": "text"- }- ],- "indexes": [- {- "name": "address_name_idx",- "visible": true,- "expressions": [- "name"- ]- }- ]- }- ]- }- ],- "characterSet": "UTF8",- "collation": "en_US.utf8"- }- expected: |-- {- "schemas": [- {- "name": "public",- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "type": "integer"- },- {- "name": "name",- "type": "text"- }- ],- "indexes": [- {- "name": "address_name_idx",- "expressions": [- "name"- ],- "visible": true- }- ]- }- ]- }- ],- "characterSet": "UTF8",- "collation": "en_US.utf8"- }-- description: Create different table- ancestor: |-- {- "schemas": [- {- "name": "public",- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "type": "integer"- }- ]- }- ]- }- ],- "characterSet": "UTF8",- "collation": "en_US.utf8"- }- head: |-- {- "schemas": [- {- "name": "public",- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "type": "integer"- }- ]- },- {- "name": "address",- "columns": [- {- "name": "id",- "type": "integer"- }- ]- }- ]- }- ],- "characterSet": "UTF8",- "collation": "en_US.utf8"- }- base: |-- {- "schemas": [- {- "name": "public",- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "type": "integer"- }- ]- },- {- "name": "salary",- "columns": [- {- "name": "id",- "type": "integer"- }- ]- }- ]- }- ],- "characterSet": "UTF8",- "collation": "en_US.utf8"- }- expected: |-- {- "schemas": [- {- "name": "public",- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "type": "integer"- }- ]- },- {- "name": "address",- "columns": [- {- "name": "id",- "type": "integer"- }- ]- },- {- "name": "salary",- "columns": [- {- "name": "id",- "type": "integer"- }- ]- }- ]- }- ],- "characterSet": "UTF8",- "collation": "en_US.utf8"- }-- description: no change- ancestor: |-- {- "schemas": [- {- "name": "public",- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "type": "integer"- }- ]- }- ]- }- ],- "characterSet": "UTF8",- "collation": "en_US.utf8"- }- head: |-- {- "schemas": [- {- "name": "public",- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "type": "integer"- }- ]- }- ]- }- ],- "characterSet": "UTF8",- "collation": "en_US.utf8"- }- base: |-- {- "schemas": [- {- "name": "public",- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "type": "integer"- }- ]- }- ]- }- ],- "characterSet": "UTF8",- "collation": "en_US.utf8"- }- expected: |-- {- "schemas": [- {- "name": "public",- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "type": "integer"- }- ]- }- ]- }- ],- "characterSet": "UTF8",- "collation": "en_US.utf8"- }-- description: Integer Synonyms- ancestor: |-- {- "schemas": [- {- "name": "public",- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "type": "int"- }- ]- }- ]- }- ],- "characterSet": "UTF8",- "collation": "en_US.utf8"- }- head: |-- {- "schemas": [- {- "name": "public",- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "type": "int"- }- ]- }- ]- }- ],- "characterSet": "UTF8",- "collation": "en_US.utf8"- }- base: |-- {- "schemas": [- {- "name": "public",- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "type": "int(11)"- }- ]- }- ]- }- ],- "characterSet": "UTF8",- "collation": "en_US.utf8"- }- expected: |-- {- "schemas": [- {- "name": "public",- "tables": [- {- "name": "employee",- "columns": [- {- "name": "id",- "type": "int(11)"- }- ]- }- ]- }- ],- "characterSet": "UTF8",- "collation": "en_US.utf8"- }diff --git a/backend/api/v1/testdata/check.yaml b/backend/api/v1/testdata/check.yamldeleted file mode 100644index ce56a56d8c..0000000000--- a/backend/api/v1/testdata/check.yaml+++ /dev/null@@ -1,213 +0,0 @@-- engine: 2- metadata: |-- {- "schemas": [- {- "tables": [- {- "name": "t",- "columns": [- {- "name": "a",- "nullable": true,- "type": "int",- "comment": "abcdefg"- },- {- "name": "b",- "nullable": true,- "type": "varchar(20)"- }- ],- "indexes": [- {- "name": "PRIMARY",- "expressions": [- "a",- "b"- ],- "unique": true,- "primary": true,- "visible": true- }- ],- "foreignKeys": [- {- "name": "fk1",- "columns": [- "a"- ],- "referencedTable": "t2",- "referencedColumns": [- "b"- ]- }- ]- },- {- "name": "t2",- "columns": [- {- "name": "b",- "type": "int"- }- ],- "indexes": [- {- "name": "PRIMARY",- "expressions": [- "b"- ],- "unique": true,- "primary": true,- "visible": true- }- ]- }- ]- }- ]- }- err: ""-- engine: 2- metadata: |-- {- "schemas": [- {- "tables": [- {- "name": "t",- "columns": [- {- "name": "a",- "nullable": true,- "type": "abcd",- "comment": "abcdefg"- },- {- "name": "b",- "nullable": true,- "type": "varchar(20)"- }- ],- "indexes": [- {- "name": "PRIMARY",- "expressions": [- "a",- "b"- ],- "unique": true,- "primary": true,- "visible": true- }- ],- "foreignKeys": [- {- "name": "fk1",- "columns": [- "a"- ],- "referencedTable": "t2",- "referencedColumns": [- "b"- ]- }- ]- },- {- "name": "t2",- "columns": [- {- "name": "b",- "type": "int"- }- ],- "indexes": [- {- "name": "PRIMARY",- "expressions": [- "b"- ],- "unique": true,- "primary": true,- "visible": true- }- ]- }- ]- }- ]- }- err: ""-- engine: 2- metadata: |-- {- "schemas": [- {- "tables": [- {- "name": "t",- "columns": [- {- "name": "a",- "nullable": true,- "type": "int",- "comment": "abcdefg"- },- {- "name": "b",- "nullable": true,- "type": "varchar(20)"- }- ],- "indexes": [- {- "name": "PRIMARY",- "expressions": [- "a",- "c"- ],- "unique": true,- "primary": true,- "visible": true- }- ],- "foreignKeys": [- {- "name": "fk1",- "columns": [- "a"- ],- "referencedTable": "t2",- "referencedColumns": [- "b"- ]- }- ]- },- {- "name": "t2",- "columns": [- {- "name": "b",- "type": "int"- }- ],- "indexes": [- {- "name": "PRIMARY",- "expressions": [- "b"- ],- "unique": true,- "primary": true,- "visible": true- }- ]- }- ]- }- ]- }- err: primary key column c not found in table t