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(test): delete orphaned engine test fixtures (#21403)
Danny Xu6147b5e207ee
diff --git a/backend/plugin/parser/mysql/test-data/differ/test_differ_column.yaml b/backend/plugin/parser/mysql/test-data/differ/test_differ_column.yamldeleted file mode 100644index 10adca11ef..0000000000--- a/backend/plugin/parser/mysql/test-data/differ/test_differ_column.yaml+++ /dev/null@@ -1,483 +0,0 @@-- oldSchema: |- CREATE TABLE `t1` (`id` INT, `name` VARCHAR(55));- newSchema: |- CREATE TABLE `t1` (`id` INT);- diff: |+- ALTER TABLE `t1` DROP COLUMN `name`;--- oldSchema: |- CREATE TABLE `t1` (`id` INT);- newSchema: |- CREATE TABLE `t1` (`id` INT, `name` VARCHAR(55));- diff: |+- ALTER TABLE `t1` ADD COLUMN `name` VARCHAR(55) AFTER `id`;--- oldSchema: |- CREATE TABLE `t1` (`id` INT, `name` VARCHAR(55));- newSchema: |- CREATE TABLE `t1` (`id` INT, `name` INT);- diff: |+- ALTER TABLE `t1` MODIFY COLUMN `name` INT;--- oldSchema: |- CREATE TABLE `t1` (- `a` int,- `b` char(20),- `c` int- );- newSchema: |- CREATE TABLE `t1` ( `a` int);- diff: |+- ALTER TABLE `t1` DROP COLUMN `b`;-- ALTER TABLE `t1` DROP COLUMN `c`;--- oldSchema: |- CREATE TABLE `t1` (`a` int);- newSchema: |- CREATE TABLE `t1` (- `a` int,- `b` char(20),- `c` int- );- diff: |+- ALTER TABLE `t1` ADD COLUMN `b` char(20) AFTER `a`;-- ALTER TABLE `t1` ADD COLUMN `c` int AFTER `b`;--- oldSchema: |- CREATE TABLE `t` (- `a` int,- `b` varchar(220),- `c` date,- `d` bit(4),- `e` json,- `f` bit(2)- );- newSchema: |- CREATE TABLE t (- `a` integer,- `b` varchar(20),- `c` boolean,- `d` bit(2),- `e` json,- `f` bit(4)- );- diff: |+- ALTER TABLE `t` MODIFY COLUMN `a` integer;-- ALTER TABLE `t` MODIFY COLUMN `b` varchar(20);-- ALTER TABLE `t` MODIFY COLUMN `c` boolean;-- ALTER TABLE `t` MODIFY COLUMN `d` bit(2);-- ALTER TABLE `t` MODIFY COLUMN `f` bit(4);--- oldSchema: |- CREATE TABLE `book` (`id` INT, PRIMARY KEY(`id`));- newSchema: |- CREATE TABLE `book` (`id` INT, `price` INT, PRIMARY KEY(`id`));- diff: |+- ALTER TABLE `book` ADD COLUMN `price` INT AFTER `id`;--- oldSchema: |- CREATE TABLE `book` (`id` INT, PRIMARY KEY(`id`));- newSchema: |- CREATE TABLE `book` (`id` INT, `price` INT, `code` VARCHAR(50), PRIMARY KEY(`id`));- diff: |+- ALTER TABLE `book` ADD COLUMN `price` INT AFTER `id`;-- ALTER TABLE `book` ADD COLUMN `code` VARCHAR(50) AFTER `price`;--- oldSchema: |- CREATE TABLE `book1` (`id` INT, PRIMARY KEY(`id`));- newSchema: |- CREATE TABLE `book` (`id` INT, `price` INT, `code` VARCHAR(50), PRIMARY KEY(`id`));- diff: |+- DROP TABLE IF EXISTS `book1`;-- CREATE TABLE IF NOT EXISTS `book` (`id` INT, `price` INT, `code` VARCHAR(50), PRIMARY KEY(`id`));--- oldSchema: |- CREATE TABLE `book` (`id` INT, `price` INT, `code` VARCHAR(50), PRIMARY KEY(`id`));- newSchema: |- CREATE TABLE `book` (`id` INT);- diff: |+- ALTER TABLE `book` DROP PRIMARY KEY;-- ALTER TABLE `book` DROP COLUMN `code`;-- ALTER TABLE `book` DROP COLUMN `price`;--- oldSchema: |- CREATE TABLE `book` (`id` INT);- newSchema: |- CREATE TABLE `book` (`id` VARCHAR(50));- diff: |+- ALTER TABLE `book` MODIFY COLUMN `id` VARCHAR(50);--- oldSchema: |- CREATE TABLE `book` (`id` INT, `a` VARCHAR(50));- newSchema: |- CREATE TABLE `book` (`id` INT, `a` VARCHAR(50));- diff: ""-- oldSchema: |- CREATE TABLE `book` (`id` INT, `a` VARCHAR(50));- newSchema: |- CREATE TABLE `book` (`id` VARCHAR(50), `a` INT);- diff: |+- ALTER TABLE `book` MODIFY COLUMN `a` INT;-- ALTER TABLE `book` MODIFY COLUMN `id` VARCHAR(50);--- oldSchema: |- CREATE TABLE `book` (`id` INT COLUMN_FORMAT FIXED, PRIMARY KEY(`id`)) ;- newSchema: |- CREATE TABLE `book` (`id` INT COLUMN_FORMAT DYNAMIC, PRIMARY KEY(`id`)) ;- diff: |+- ALTER TABLE `book` MODIFY COLUMN `id` INT COLUMN_FORMAT DYNAMIC;--- oldSchema: |- CREATE TABLE `book` (`id` INT NOT NULL);- newSchema: |- CREATE TABLE `book` (`id` INT NULL);- diff: |+- ALTER TABLE `book` MODIFY COLUMN `id` INT NULL;--- oldSchema: |- CREATE TABLE `book` (`id` INT NOT NULL);- newSchema: |- CREATE TABLE `book` (`id` INT);- diff: |+- ALTER TABLE `book` MODIFY COLUMN `id` INT;--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL DEFAULT 'Harry Potter');- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NULL DEFAULT 'Harry Potter');- diff: |+- ALTER TABLE `book` MODIFY COLUMN `name` VARCHAR(50) NULL DEFAULT 'Harry Potter';--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL DEFAULT 'Harry Potter');- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) DEFAULT 'Harry Potter');- diff: |+- ALTER TABLE `book` MODIFY COLUMN `name` VARCHAR(50) DEFAULT 'Harry Potter';--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NULL);- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NULL);- diff: ""-- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL);- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL);- diff: ""-- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL COMMENT 'Author Name');- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL COMMENT 'Book Name');- diff: |+- ALTER TABLE `book` MODIFY COLUMN `name` VARCHAR(50) NOT NULL COMMENT 'Book Name';--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) COMMENT 'Author Name');- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) COMMENT 'Book Name');- diff: |+- ALTER TABLE `book` MODIFY COLUMN `name` VARCHAR(50) COMMENT 'Book Name';--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL);- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL COMMENT 'Book Name');- diff: |+- ALTER TABLE `book` MODIFY COLUMN `name` VARCHAR(50) NOT NULL COMMENT 'Book Name';--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL COMMENT 'Book Name');- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL COMMENT 'Book Name');- diff: ""-- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL DEFAULT 'Harry Potter');- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL);- diff: |+- ALTER TABLE `book` MODIFY COLUMN `name` VARCHAR(50) NOT NULL;--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL);- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL DEFAULT 'Harry Potter');- diff: |+- ALTER TABLE `book` MODIFY COLUMN `name` VARCHAR(50) NOT NULL DEFAULT 'Harry Potter';--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL DEFAULT "Holmes");- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL DEFAULT 'Harry Potter');- diff: |+- ALTER TABLE `book` MODIFY COLUMN `name` VARCHAR(50) NOT NULL DEFAULT 'Harry Potter';--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL COMMENT 'Holmes');- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL COMMENT 'Holmes');- diff: ""-- oldSchema: |- CREATE TABLE `book` (`id` INT NOT NULL DEFAULT 0);- newSchema: |- CREATE TABLE `book` (`id` INT NULL);- diff: |+- ALTER TABLE `book` MODIFY COLUMN `id` INT NULL;--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) COMMENT 'Author Name' NOT NULL);- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) COMMENT 'Book Name' NOT NULL);- diff: |+- ALTER TABLE `book` MODIFY COLUMN `name` VARCHAR(50) COMMENT 'Book Name' NOT NULL;--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) COMMENT 'Author Name' NOT NULL);- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) COMMENT 'Book Name' NOT NULL);- diff: |+- ALTER TABLE `book` MODIFY COLUMN `name` VARCHAR(50) COMMENT 'Book Name' NOT NULL;--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) COMMENT 'Author Name' NOT NULL);- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) COMMENT 'AUTHOR NAME' NOT NULL);- diff: |+- ALTER TABLE `book` MODIFY COLUMN `name` VARCHAR(50) COMMENT 'AUTHOR NAME' NOT NULL;--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL);- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) COMMENT 'AUTHOR NAME' NOT NULL);- diff: |+- ALTER TABLE `book` MODIFY COLUMN `name` VARCHAR(50) COMMENT 'AUTHOR NAME' NOT NULL;--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) COMMENT 'AUTHOR NAME' NOT NULL);- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL);- diff: |+- ALTER TABLE `book` MODIFY COLUMN `name` VARCHAR(50) NOT NULL;--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) COMMENT 'AUTHOR NAME' NOT NULL);- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) COMMENT 'AUTHOR NAME' NOT NULL);- diff: ""-- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL);- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL);- diff: ""-- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) DEFAULT 'Harry Potter' NOT NULL);- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL);- diff: |+- ALTER TABLE `book` MODIFY COLUMN `name` VARCHAR(50) NOT NULL;--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL);- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) DEFAULT 'Harry Potter' NOT NULL);- diff: |+- ALTER TABLE `book` MODIFY COLUMN `name` VARCHAR(50) DEFAULT 'Harry Potter' NOT NULL;--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) DEFAULT 'Holmes' NOT NULL);- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) DEFAULT 'Harry Potter' NOT NULL);- diff: |+- ALTER TABLE `book` MODIFY COLUMN `name` VARCHAR(50) DEFAULT 'Harry Potter' NOT NULL;--- oldSchema: |- CREATE TABLE `book` (`id` INT DEFAULT 0 NOT NULL);- newSchema: |- CREATE TABLE `book` (`id` INT NOT NULL);- diff: |+- ALTER TABLE `book` MODIFY COLUMN `id` INT NOT NULL;--- oldSchema: |- CREATE TABLE `book` (`id` INT DEFAULT 0 NOT NULL);- newSchema: |- CREATE TABLE `book` (`id` INT DEFAULT 1 NOT NULL);- diff: |+- ALTER TABLE `book` MODIFY COLUMN `id` INT DEFAULT 1 NOT NULL;--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) DEFAULT 'Holmes' NOT NULL);- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) DEFAULT 'Holmes' NOT NULL);- diff: ""-- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL);- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL);- diff: ""-- oldSchema: |- CREATE TABLE `action` (- `action_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,- `last_update` timestamp not null default current_timestamp- );- newSchema: |- CREATE TABLE `action` (- `action_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,- `last_update` timestamp not null default current_timestamp(1)- );- diff: |+- ALTER TABLE `action` MODIFY COLUMN `last_update` timestamp not null default current_timestamp(1);--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) COLLATE utf8mb4_bin DEFAULT 'Harry Potter' NOT NULL);- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) COLLATE utf8mb4_polish_ci DEFAULT 'Harry Potter' NOT NULL);- diff: |+- ALTER TABLE `book` MODIFY COLUMN `name` VARCHAR(50) COLLATE utf8mb4_polish_ci DEFAULT 'Harry Potter' NOT NULL;--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) DEFAULT 'Harry Potter' NOT NULL);- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) COLLATE utf8mb4_polish_ci DEFAULT 'Harry Potter' NOT NULL);- diff: |+- ALTER TABLE `book` MODIFY COLUMN `name` VARCHAR(50) COLLATE utf8mb4_polish_ci DEFAULT 'Harry Potter' NOT NULL;--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) DEFAULT 'Harry Potter' NOT NULL);- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) DEFAULT 'Harry Potter' NOT NULL);- diff: ""-- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) COLLATE utf8mb4_bin DEFAULT 'Harry Potter' NOT NULL);- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) COLLATE utf8mb4_bin DEFAULT 'Harry Potter' NOT NULL);- diff: ""-- oldSchema: |- CREATE TABLE `book` (`id` INT PRIMARY KEY);- newSchema: |- CREATE TABLE `book` (- `id` INT PRIMARY KEY,- `name` VARCHAR(50) NOT NULL,- `author` VARCHAR(50) NOT NULL- );- diff: |+- ALTER TABLE `book` ADD COLUMN `name` VARCHAR(50) NOT NULL AFTER `id`;-- ALTER TABLE `book` ADD COLUMN `author` VARCHAR(50) NOT NULL AFTER `name`;--- oldSchema: |- CREATE TABLE `book` (`author` VARCHAR(50) NOT NULL);- newSchema: |- CREATE TABLE `book` (- `id` INT PRIMARY KEY,- `name` VARCHAR(50) NOT NULL,- `author` VARCHAR(50) NOT NULL- );- diff: |+- ALTER TABLE `book` ADD COLUMN `id` INT PRIMARY KEY FIRST;-- ALTER TABLE `book` ADD COLUMN `name` VARCHAR(50) NOT NULL AFTER `id`;--- oldSchema: |- CREATE TABLE `book` (- `id` INT PRIMARY KEY,- `author` VARCHAR(50) NOT NULL- );- newSchema: |- CREATE TABLE `book` (- `id` INT PRIMARY KEY,- `name` VARCHAR(50) NOT NULL,- `author` VARCHAR(50) NOT NULL- );- diff: |+- ALTER TABLE `book` ADD COLUMN `name` VARCHAR(50) NOT NULL AFTER `id`;--- oldSchema: |- CREATE TABLE `book` (- `author` VARCHAR(50) NOT NULL,- `id` INT PRIMARY KEY,- `name` VARCHAR(50) NOT NULL- );- newSchema: |- CREATE TABLE `book` (- `id` INT PRIMARY KEY,- `name` VARCHAR(50) NOT NULL,- `author` VARCHAR(50) NOT NULL- );- diff: ""-- oldSchema: |- CREATE TABLE `book` (- `name` VARCHAR(50) NOT NULL- );- newSchema: |- CREATE TABLE `book` (- `author` VARCHAR(50) NOT NULL- );- diff: |+- ALTER TABLE `book` ADD COLUMN `author` VARCHAR(50) NOT NULL FIRST;-- ALTER TABLE `book` DROP COLUMN `name`;--- oldSchema: |- CREATE TABLE `book` (- `c1` INT,- `c2` INT,- `c3` INT,- `c4` INT,- `c8` INT- );- newSchema: |- CREATE TABLE `book` (- `c9` INT,- `c8` VARCHAR(10),- `c4` INT,- `c2` VARCHAR(10)- );- diff: |+- ALTER TABLE `book` ADD COLUMN `c9` INT FIRST;-- ALTER TABLE `book` MODIFY COLUMN `c2` VARCHAR(10);-- ALTER TABLE `book` MODIFY COLUMN `c8` VARCHAR(10);-- ALTER TABLE `book` DROP COLUMN `c1`;-- ALTER TABLE `book` DROP COLUMN `c3`;--- oldSchema: |- CREATE TABLE `book` (- `c1` INT,- `c2` INT,- `c3` INT,- `c4` INT,- `c5` INT- );- newSchema: |- CREATE TABLE `book` (- `c6` INT,- `c2` INT,- `c3` INT,- `c7` INT,- `c8` INT,- `c4` INT,- `c5` INT- );- diff: |+- ALTER TABLE `book` ADD COLUMN `c6` INT FIRST;-- ALTER TABLE `book` ADD COLUMN `c7` INT AFTER `c3`;-- ALTER TABLE `book` ADD COLUMN `c8` INT AFTER `c7`;-- ALTER TABLE `book` DROP COLUMN `c1`;-diff --git a/backend/plugin/parser/mysql/test-data/differ/test_differ_constraint.yaml b/backend/plugin/parser/mysql/test-data/differ/test_differ_constraint.yamldeleted file mode 100644index bff39e49cb..0000000000--- a/backend/plugin/parser/mysql/test-data/differ/test_differ_constraint.yaml+++ /dev/null@@ -1,242 +0,0 @@-- oldSchema: |- create table t1(- a int,- b int,- constraint check_a check(a > 1),- constraint check_b check(b > 1)- );- newSchema: |- create table t1(- a int,- b int,- constraint check_b check(b > 1),- constraint check_a check(a > 1)- )- diff: ""-- oldSchema: |- create table `t1` (- `a` INT,- `b` INT,- CONSTRAINT `check_a` CHECK((`a`>`b`)),- CONSTRAINT `check_b` CHECK((`b`>1))- );- newSchema: |- create table `t1` (- `a` INT,- `b` INT,- CONSTRAINT `check_b` CHECK((`b`>`a`)),- CONSTRAINT `check_c` CHECK((`a`>1))- );- diff: |+- ALTER TABLE `t1` DROP CHECK `check_a`;-- ALTER TABLE `t1` DROP CHECK `check_b`;-- ALTER TABLE `t1` ADD CONSTRAINT `check_b` CHECK((`b`>`a`));-- ALTER TABLE `t1` ADD CONSTRAINT `check_c` CHECK((`a`>1));--- oldSchema: |- create table `book` (- `a` INT,- CONSTRAINT `t1_chk_1` CHECK((`a`> 0))- );- newSchema: |- create table `book` (- `a` INT,- CONSTRAINT `t1_chk_1` CHECK((`a`> 0))- );- diff: ""-- oldSchema: |- create table `book` (- `id` INT,- `price` INT,- PRIMARY KEY(`id`),- CONSTRAINT `check_price` CHECK((price > 0))- );- newSchema: |- create table `book` (- `id` INT,- `price` INT,- PRIMARY KEY(`id`),- CONSTRAINT `check_price` CHECK((price > 1))- );- diff: |+- ALTER TABLE `book` DROP CHECK `check_price`;-- ALTER TABLE `book` ADD CONSTRAINT `check_price` CHECK((price > 1));--- oldSchema: |- create table `book` (- `id` INT,- `price` INT,- PRIMARY KEY(`id`),- CONSTRAINT `check_price` CHECK((price > 0))- );- newSchema: |- create table `book` (- `id` INT,- `price` INT,- PRIMARY KEY(`id`),- CONSTRAINT `check_price` CHECK((price > 1)) NOT ENFORCED- );- diff: |+- ALTER TABLE `book` DROP CHECK `check_price`;-- ALTER TABLE `book` ADD CONSTRAINT `check_price` CHECK((price > 1)) NOT ENFORCED;--- oldSchema: |- create table `book` (- `id` INT,- `price` INT,- PRIMARY KEY(`id`),- CONSTRAINT `check_price` CHECK((price > 0))- );- newSchema: |- create table `book` (- `id` INT,- `price` INT,- PRIMARY KEY(`id`),- CONSTRAINT `check_price` CHECK((price > 0)) NOT ENFORCED- );- diff: |+- ALTER TABLE `book` DROP CHECK `check_price`;-- ALTER TABLE `book` ADD CONSTRAINT `check_price` CHECK((price > 0)) NOT ENFORCED;--- oldSchema: |- create table `book` (- `id` INT,- `price` INT,- PRIMARY KEY(`id`),- CONSTRAINT `check_price` CHECK((`price` > 0)),- CONSTRAINT `check_price2` CHECK((`price` > 1))- );- newSchema: |- create table `book` (- `id` INT,- `price` INT,- PRIMARY KEY(`id`),- CONSTRAINT `check_price` CHECK((price > 0)) NOT ENFORCED- );- diff: |+- ALTER TABLE `book` DROP CHECK `check_price`;-- ALTER TABLE `book` DROP CHECK `check_price2`;-- ALTER TABLE `book` ADD CONSTRAINT `check_price` CHECK((price > 0)) NOT ENFORCED;--- oldSchema: |- CREATE TABLE `department` (`id` INT, `name` VARCHAR(50) NOT NULL, PRIMARY KEY(`department`));-- CREATE TABLE `employee` (`id` INT, `name` VARCHAR(50) NOT NULL, `department_id` INT, PRIMARY KEY(`department`), FOREIGN KEY employee_ibfk_1(department_id) REFERENCES department(`id`));- newSchema: |- CREATE TABLE `department` (`id` INT, `name` VARCHAR(50) NOT NULL, PRIMARY KEY(`department`));-- CREATE TABLE `employee` (`id` INT, `name` VARCHAR(50) NOT NULL, `department_id` INT, PRIMARY KEY(`department`), FOREIGN KEY fk_2(department_id) REFERENCES department(`id`));- diff: |+- ALTER TABLE `employee` DROP FOREIGN KEY `employee_ibfk_1`;-- ALTER TABLE employee ADD FOREIGN KEY fk_2(department_id) REFERENCES department(`id`);--- oldSchema: |- CREATE TABLE `department` (- `id` INT NOT NULL,- `name` VARCHAR(50) NOT NULL,- PRIMARY KEY(`id`),- KEY `id_name_idx` (`id`, `name`)- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;-- CREATE TABLE `employee` (- `id` INT NOT NULL,- `name` VARCHAR(50) NOT NULL,- `department_id` INT DEFAULT NULL,- `department_name` VARCHAR(50) DEFAULT NULL,- PRIMARY KEY(`department`),- KEY `department_id_name_idx` (`department_id`, `department_name`),- CONSTRAINT `employee_ibfk_1` FOREIGN KEY (`department_id`, `department_name`) REFERENCES `department`(`id`, `name`)- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;;- newSchema: |- CREATE TABLE `department` (- `id` INT NOT NULL,- `name` VARCHAR(50) NOT NULL,- PRIMARY KEY(`id`),- KEY `id_idx` (`id`)- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;-- CREATE TABLE `employee` (- `id` INT NOT NULL,- `name` VARCHAR(50) NOT NULL,- `department_id` INT DEFAULT NULL,- `department_name` VARCHAR(50) DEFAULT NULL,- PRIMARY KEY(`department`),- KEY `department_id_idx` (`department_id`),- CONSTRAINT `employee_ibfk_1` FOREIGN KEY (`department_id`) REFERENCES `department`(`id`)- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;;- diff: |+- ALTER TABLE `employee` DROP FOREIGN KEY `employee_ibfk_1`;-- DROP INDEX `id_name_idx` ON `department`;-- DROP INDEX `department_id_name_idx` ON `employee`;-- CREATE INDEX `id_idx` ON `department`(`id`);-- CREATE INDEX `department_id_idx` ON `employee`(`department_id`);-- ALTER TABLE employee ADD CONSTRAINT `employee_ibfk_1` FOREIGN KEY (`department_id`) REFERENCES `department`(`id`);--- oldSchema: |- CREATE TABLE `employee` (- `id` INT NOT NULL,- `name` VARCHAR(50) NOT NULL,- `leader_id` INT DEFAULT NULL,- PRIMARY KEY(`id`),- CONSTRAINT `employee_ibfk_1` FOREIGN KEY (`leader_id`) REFERENCES `employee`(`id`)- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;;- newSchema: |- CREATE TABLE `employee` (- `id` INT NOT NULL,- `name` VARCHAR(50) NOT NULL,- `leader_id` INT DEFAULT NULL,- `manager_id` INT DEFAULT NULL,- PRIMARY KEY(`id`),- CONSTRAINT `employee_ibfk_1` FOREIGN KEY (`manager`) REFERENCES `employee`(`id`)- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;;- diff: |+- ALTER TABLE `employee` DROP FOREIGN KEY `employee_ibfk_1`;-- ALTER TABLE `employee` ADD COLUMN `manager_id` INT DEFAULT NULL AFTER `leader_id`;-- ALTER TABLE employee ADD CONSTRAINT `employee_ibfk_1` FOREIGN KEY (`manager`) REFERENCES `employee`(`id`);--- oldSchema: |- create table `book` (- `a` INT,- CONSTRAINT `t1_chk_1` CHECK((`a`> 0))- );- newSchema: |- create table `book` (- `a` INT,- CONSTRAINT `t1_chk_1` CHECK((`a`> 0))- );- diff: ""-- oldSchema: |- create table `book` (- `id` INT,- `price` INT,- PRIMARY KEY(`id`),- CONSTRAINT `check_price` CHECK((price > 0))- );- newSchema: |- create table `book` (- `id` INT,- `price` INT,- PRIMARY KEY(`id`),- CONSTRAINT `check_price` CHECK((price > 1))- );- diff: |+- ALTER TABLE `book` DROP CHECK `check_price`;-- ALTER TABLE `book` ADD CONSTRAINT `check_price` CHECK((price > 1));-diff --git a/backend/plugin/parser/mysql/test-data/differ/test_differ_event.yaml b/backend/plugin/parser/mysql/test-data/differ/test_differ_event.yamldeleted file mode 100644index 5aef4600f6..0000000000--- a/backend/plugin/parser/mysql/test-data/differ/test_differ_event.yaml+++ /dev/null@@ -1,29 +0,0 @@-- oldSchema: ""- newSchema: |- DELIMITER ;;- CREATE EVENT e_totals ON SCHEDULE AT '2006-02-10 23:59:00' DO INSERT INTO test.totals VALUES(NOW());;- DELIMITER ;- diff: |+- DELIMITER ;;- CREATE EVENT e_totals ON SCHEDULE AT '2006-02-10 23:59:00' DO INSERT INTO test.totals VALUES(NOW());;- DELIMITER ;--- oldSchema: |- DELIMITER ;;- CREATE EVENT e_totals ON SCHEDULE AT '2006-02-10 23:59:00' DO INSERT INTO test.totals VALUES(NOW());;- DELIMITER ;- newSchema: ""- diff: |+- DROP EVENT IF EXISTS `e_totals`;--- oldSchema: |- CREATE EVENT `purge_old_users` ON SCHEDULE EVERY 1 DAY STARTS '2023-07-01 00:00:00' DO DELETE FROM users WHERE age > 100;- newSchema: |- CREATE EVENT `purge_old_users` ON SCHEDULE EVERY 1 DAY STARTS '2023-07-01 00:00:00' DO DELETE FROM users WHERE age > 110;- diff: |+- DROP EVENT IF EXISTS `purge_old_users`;-- DELIMITER ;;- CREATE EVENT `purge_old_users` ON SCHEDULE EVERY 1 DAY STARTS '2023-07-01 00:00:00' DO DELETE FROM users WHERE age > 110;;- DELIMITER ;-diff --git a/backend/plugin/parser/mysql/test-data/differ/test_differ_function.yaml b/backend/plugin/parser/mysql/test-data/differ/test_differ_function.yamldeleted file mode 100644index 0ec19ba01d..0000000000--- a/backend/plugin/parser/mysql/test-data/differ/test_differ_function.yaml+++ /dev/null@@ -1,44 +0,0 @@-- oldSchema: ""- newSchema: |- DELIMITER ;;- CREATE FUNCTION no_of_years(date1 date) RETURNS int DETERMINISTIC- BEGIN- DECLARE date2 DATE;- Select current_date()into date2;- RETURN year(date2)-year(date1);- END;;- DELIMITER ;- diff: |+- DELIMITER ;;- CREATE FUNCTION no_of_years(date1 date) RETURNS int DETERMINISTIC- BEGIN- DECLARE date2 DATE;- Select current_date()into date2;- RETURN year(date2)-year(date1);- END;;- DELIMITER ;--- oldSchema: |- DELIMITER ;;- CREATE FUNCTION no_of_years(date1 date) RETURNS int DETERMINISTIC- BEGIN- DECLARE date2 DATE;- Select current_date()into date2;- RETURN year(date2)-year(date1);- END;;- DELIMITER ;- newSchema: ""- diff: |+- DROP FUNCTION IF EXISTS `no_of_years`;--- oldSchema: |- CREATE DEFINER=`root`@`%` FUNCTION `AddOne`(`v` INT) RETURNS int BEGIN DECLARE a INT; SET a = v; SET a = a + 1; RETURN a; END;- newSchema: |- CREATE DEFINER=`root`@`%` FUNCTION `AddOne`(`v` INT) RETURNS int BEGIN DECLARE a INT; SET a = v; SET a = a * 1 + 1; RETURN a; END;- diff: |+- DROP FUNCTION IF EXISTS `AddOne`;-- DELIMITER ;;- CREATE DEFINER=`root`@`%` FUNCTION `AddOne`(`v` INT) RETURNS int BEGIN DECLARE a INT; SET a = v; SET a = a * 1 + 1; RETURN a; END;;- DELIMITER ;-diff --git a/backend/plugin/parser/mysql/test-data/differ/test_differ_index.yaml b/backend/plugin/parser/mysql/test-data/differ/test_differ_index.yamldeleted file mode 100644index a721cd6a3e..0000000000--- a/backend/plugin/parser/mysql/test-data/differ/test_differ_index.yaml+++ /dev/null@@ -1,186 +0,0 @@-- oldSchema: |- CREATE TABLE `t1` (`id` INT);- newSchema: |- CREATE TABLE `t1` (`id` INT);- CREATE INDEX `i1` ON `t1` (`id`);- diff: |+- CREATE INDEX `i1` ON `t1` (`id`);--- oldSchema: |- CREATE TABLE `t1` (`id` INT);- CREATE INDEX `i1` ON `t1` (id);- newSchema: |- CREATE TABLE `t1` (`id` INT);- diff: |+- DROP INDEX `i1` ON `t1`;--- oldSchema: |- CREATE TABLE `t1` (- `a` INT NOT NULL,- `b` INT NOT NULL,- `c` INT NOT NULL- );- CREATE INDEX `idx1` ON `t1` (`a`, `b`, (`c`+1)) USING BTREE;- CREATE INDEX `idx2` ON `t1` (`a`) USING HASH;- newSchema: |- CREATE TABLE `t1` (- `a` INT NOT NULL,- `b` INT NOT NULL,- `c` INT NOT NULL- );- CREATE INDEX `idx2` ON `t1` (`a`) USING btree;- CREATE INDEX `idx3` ON `t1` (`a`, `b`) USING btree;- diff: |+- DROP INDEX `idx1` ON `t1`;-- DROP INDEX `idx2` ON `t1`;-- CREATE INDEX `idx2` ON `t1` (`a`) USING btree;-- CREATE INDEX `idx3` ON `t1` (`a`, `b`) USING btree;--- oldSchema: "CREATE TABLE `t1` (\n `a` char(20),\n `b` char(20) \n);\nCREATE INDEX `i1` ON `t1`(`a`) USING BTREE;\nCREATE INDEX `i2` ON `t1`(`a`) USING BTREE;\n"- newSchema: "CREATE TABLE `t1` (\n `a` char(20),\n `b` char(20) \n);\nCREATE INDEX `i1` ON `t1`(`a`) USING BTREE;\nCREATE INDEX `i2` ON `t1`(`b`) USING BTREE;\n"- diff: |+- DROP INDEX `i2` ON `t1`;-- CREATE INDEX `i2` ON `t1`(`b`) USING BTREE;--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL, INDEX `book_idx` (`name`) KEY_BLOCK_SIZE=30);- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL, INDEX `book_idx` (`name`) KEY_BLOCK_SIZE=50);- diff: |+- DROP INDEX `book_idx` ON `book`;-- CREATE INDEX `book_idx` ON `book`(`name`) KEY_BLOCK_SIZE=50;--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL, INDEX `book_idx` (`name`) COMMENT 'comment_a');- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL, INDEX `book_idx` (`name`) COMMENT 'comment_b');- diff: |+- DROP INDEX `book_idx` ON `book`;-- CREATE INDEX `book_idx` ON `book`(`name`) COMMENT 'comment_b';--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL, INDEX `book_idx` (`name`) VISIBLE);- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL, INDEX `book_idx` (`name`) INVISIBLE);- diff: |+- DROP INDEX `book_idx` ON `book`;-- CREATE INDEX `book_idx` ON `book`(`name`) INVISIBLE;--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL, FULLTEXT INDEX `book_idx` (`name`) KEY_BLOCK_SIZE=30 COMMENT 'no difference');- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL, FULLTEXT INDEX `book_idx` (`name`) KEY_BLOCK_SIZE=30 COMMENT 'no difference');- diff: ""-- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL, CONSTRAINT PRIMARY KEY (`name`) KEY_BLOCK_SIZE=30);- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL, CONSTRAINT PRIMARY KEY (`name`) KEY_BLOCK_SIZE=50);- diff: |+- ALTER TABLE `book` DROP PRIMARY KEY;-- ALTER TABLE `book` ADD PRIMARY KEY (`name`) KEY_BLOCK_SIZE=50;--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL, CONSTRAINT PRIMARY KEY (`name`) VISIBLE);- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL, CONSTRAINT PRIMARY KEY (`name`) INVISIBLE);- diff: |+- ALTER TABLE `book` DROP PRIMARY KEY;-- ALTER TABLE `book` ADD PRIMARY KEY (`name`) INVISIBLE;--- oldSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL, CONSTRAINT PRIMARY KEY (`name`) KEY_BLOCK_SIZE=30 COMMENT 'no difference');- newSchema: |- CREATE TABLE `book` (`name` VARCHAR(50) NOT NULL, CONSTRAINT PRIMARY KEY (`name`) KEY_BLOCK_SIZE=30 COMMENT 'no difference');- diff: ""-- oldSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(50) NOT NULL, INDEX `book_idx` USING BTREE (`id`, `name`) COMMENT 'comment_a');- newSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(50) NOT NULL, INDEX `book_idx` USING BTREE (`id`) COMMENT 'comment_a');- diff: |+- DROP INDEX `book_idx` ON `book`;-- CREATE INDEX `book_idx` ON `book`(`id`) USING BTREE COMMENT 'comment_a';--- oldSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(50) NOT NULL, INDEX `book_idx` TYPE BTREE (`id`, `name`) COMMENT 'comment_a');- newSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(50) NOT NULL, INDEX `book_idx` TYPE BTREE (`id`) COMMENT 'comment_a');- diff: |+- DROP INDEX `book_idx` ON `book`;-- CREATE INDEX `book_idx` ON `book`(`id`) TYPE BTREE COMMENT 'comment_a';--- oldSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(50) NOT NULL, INDEX `book_idx` USING BTREE (`id`) COMMENT 'comment_a');- newSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(50) NOT NULL, INDEX `book_idx` USING BTREE ((`id` + 1)) COMMENT 'comment_a');- diff: |+- DROP INDEX `book_idx` ON `book`;-- CREATE INDEX `book_idx` ON `book`((`id` + 1)) USING BTREE COMMENT 'comment_a';--- oldSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(50) NOT NULL, INDEX `book_idx` USING BTREE ((`id` + 1)) COMMENT 'comment_a');- newSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(50) NOT NULL, INDEX `book_idx` USING BTREE ((`id` + 2)) COMMENT 'comment_a');- diff: |+- DROP INDEX `book_idx` ON `book`;-- CREATE INDEX `book_idx` ON `book`((`id` + 2)) USING BTREE COMMENT 'comment_a';--- oldSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(50) NOT NULL, INDEX `book_idx` USING BTREE (`id`, `name`) COMMENT 'comment_a');- newSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(50) NOT NULL, INDEX `book_idx` USING BTREE (`id`, `name`) COMMENT 'comment_a');- diff: ""-- oldSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(50) NOT NULL, INDEX `book_idx` USING BTREE ((`id` + 1)) COMMENT 'comment_a');- newSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(50) NOT NULL, INDEX `book_idx` USING BTREE ((`id` + 1)) COMMENT 'comment_a');- diff: ""-- oldSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(50) NOT NULL, CONSTRAINT PRIMARY KEY (`id`, `name`) COMMENT 'comment_a');- newSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(50) NOT NULL, CONSTRAINT PRIMARY KEY (`name`) COMMENT 'comment_b');- diff: |+- ALTER TABLE `book` DROP PRIMARY KEY;-- ALTER TABLE `book` ADD PRIMARY KEY (`name`) COMMENT 'comment_b';--- oldSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(50) NOT NULL, CONSTRAINT PRIMARY KEY (`id`) COMMENT 'comment_a');- newSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(50) NOT NULL, CONSTRAINT PRIMARY KEY ((`id` + 1)) COMMENT 'comment_b');- diff: |+- ALTER TABLE `book` DROP PRIMARY KEY;-- ALTER TABLE `book` ADD PRIMARY KEY ((`id` + 1)) COMMENT 'comment_b';--- oldSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(50) NOT NULL, CONSTRAINT PRIMARY KEY ((`id` + 1)) COMMENT 'comment_b');- newSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(50) NOT NULL, CONSTRAINT PRIMARY KEY ((`id` + 2)) COMMENT 'comment_b');- diff: |+- ALTER TABLE `book` DROP PRIMARY KEY;-- ALTER TABLE `book` ADD PRIMARY KEY ((`id` + 2)) COMMENT 'comment_b';--- oldSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(50) NOT NULL, CONSTRAINT PRIMARY KEY (`id`, `name`) COMMENT 'comment_a');- newSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(50) NOT NULL, CONSTRAINT PRIMARY KEY (`id`, `name`) COMMENT 'comment_a');- diff: ""-- oldSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(50) NOT NULL, CONSTRAINT PRIMARY KEY ((`id` + 1)) COMMENT 'comment_b');- newSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(50) NOT NULL, CONSTRAINT PRIMARY KEY ((`id` + 1)) COMMENT 'comment_b');- diff: ""diff --git a/backend/plugin/parser/mysql/test-data/differ/test_differ_partition.yaml b/backend/plugin/parser/mysql/test-data/differ/test_differ_partition.yamldeleted file mode 100644index a921293bc3..0000000000--- a/backend/plugin/parser/mysql/test-data/differ/test_differ_partition.yaml+++ /dev/null@@ -1,17 +0,0 @@-- oldSchema: |- CREATE TABLE range_partition(- id INT- ) PARTITION BY RANGE (id) (- PARTITION p0 VALUES LESS THAN (10)- );- newSchema: |- CREATE TABLE range_partition(- id INT- ) PARTITION BY RANGE (id) (- PARTITION p0 VALUES LESS THAN (10),- PARTITION p1 VALUES LESS THAN (20)- );- diff: |- ALTER TABLE `range_partition` PARTITION BY RANGE (`id`)- (PARTITION p0 VALUES LESS THAN (10) ENGINE=InnoDB,- PARTITION p1 VALUES LESS THAN (20) ENGINE=InnoDB);diff --git a/backend/plugin/parser/mysql/test-data/differ/test_differ_procedure.yaml b/backend/plugin/parser/mysql/test-data/differ/test_differ_procedure.yamldeleted file mode 100644index ee3b0f39b3..0000000000--- a/backend/plugin/parser/mysql/test-data/differ/test_differ_procedure.yaml+++ /dev/null@@ -1,53 +0,0 @@-- oldSchema: ""- newSchema: |- DELIMITER ;;- CREATE PROCEDURE citycount (IN country CHAR(3), OUT cities INT)- BEGIN- SELECT COUNT(*) INTO cities FROM world.city- WHERE CountryCode = country;- END;;- DELIMITER ;- diff: |+- DELIMITER ;;- CREATE PROCEDURE citycount (IN country CHAR(3), OUT cities INT)- BEGIN- SELECT COUNT(*) INTO cities FROM world.city- WHERE CountryCode = country;- END;;- DELIMITER ;--- oldSchema: |- DELIMITER ;;- CREATE PROCEDURE citycount (IN country CHAR(3), OUT cities INT)- BEGIN- SELECT COUNT(*) INTO cities FROM world.city- WHERE CountryCode = country;- END;;- DELIMITER ;- newSchema: ""- diff: |+- DROP PROCEDURE IF EXISTS `citycount`;--- oldSchema: |- CREATE DEFINER=`admin`@`localhost` PROCEDURE `account_count`()- SQL SECURITY INVOKER- BEGIN- SELECT 'Number of accounts:', COUNT(*) FROM mysql.user;- END;- newSchema: |- CREATE DEFINER=`admin`@`localhost` PROCEDURE `account_count`()- SQL SECURITY INVOKER- BEGIN- SELECT 'Number of accounts:', (COUNT(*)-1) FROM mysql.user;- END ;- diff: |+- DROP PROCEDURE IF EXISTS `account_count`;-- DELIMITER ;;- CREATE DEFINER=`admin`@`localhost` PROCEDURE `account_count`()- SQL SECURITY INVOKER- BEGIN- SELECT 'Number of accounts:', (COUNT(*)-1) FROM mysql.user;- END;;- DELIMITER ;-diff --git a/backend/plugin/parser/mysql/test-data/differ/test_differ_table.yaml b/backend/plugin/parser/mysql/test-data/differ/test_differ_table.yamldeleted file mode 100644index 28dcc4ce74..0000000000--- a/backend/plugin/parser/mysql/test-data/differ/test_differ_table.yaml+++ /dev/null@@ -1,164 +0,0 @@-- oldSchema: |- CREATE TABLE `t1` (`id` INT);- newSchema: |- CREATE TABLE `t1` (`id` INT, UNIQUE KEY `uk` (`id`));- diff: |+- CREATE UNIQUE INDEX `uk` ON `t1`(`id`);--- oldSchema: |- CREATE TABLE `t1` (`id` INT);- newSchema: |- CREATE TABLE `t2` (`id` INT);- diff: |+- DROP TABLE IF EXISTS `t1`;-- CREATE TABLE IF NOT EXISTS `t2` (`id` INT);--- oldSchema: |- CREATE TABLE `t1` (- `id` INT PRIMARY KEY,- `username` VARCHAR(55) NOT NULL- );- newSchema: |- CREATE TABLE `t2` (`id` INT);- CREATE TABLE `t1` (- `id` INT PRIMARY KEY,- `username` VARCHAR(55) NOT NULL- );- diff: |+- CREATE TABLE IF NOT EXISTS `t2` (`id` INT);--- oldSchema: |- CREATE TABLE `projects` (`id` INT);- newSchema: |- CREATE TABLE `users` (- `id` INT NOT NULL,- `username` VARCHAR(25) NOT NULL,- PRIMARY KEY (`id`)- );- CREATE TABLE `projects` (`id` INT);-- CREATE TABLE `repositories` (- `id` INT NOT NULL,- PRIMARY KEY (`id`)- );- diff: |+- CREATE TABLE IF NOT EXISTS `repositories` (- `id` INT NOT NULL,- PRIMARY KEY (`id`)- );-- CREATE TABLE IF NOT EXISTS `users` (- `id` INT NOT NULL,- `username` VARCHAR(25) NOT NULL,- PRIMARY KEY (`id`)- );--- oldSchema: |- CREATE TABLE `t1` (- `a` int,- `b` int,- `c` int- );- CREATE INDEX `idx_t1_a` ON `t1`(`a`);- newSchema: ""- diff: |+- DROP TABLE IF EXISTS `t1`;--- oldSchema: |- CREATE TABLE `t1` (- `id` INT- );- newSchema: |- CREATE TABLE `book` (- `id` INT,- `price` INT,- PRIMARY KEY(`id`)- );- CREATE TABLE `author` (- `id` INT,- `name` VARCHAR(255),- PRIMARY KEY(`id`)- );- diff: |+- DROP TABLE IF EXISTS `t1`;-- CREATE TABLE IF NOT EXISTS `author` (- `id` INT,- `name` VARCHAR(255),- PRIMARY KEY(`id`)- );-- CREATE TABLE IF NOT EXISTS `book` (- `id` INT,- `price` INT,- PRIMARY KEY(`id`)- );--- oldSchema: |- CREATE TABLE `book` (- `id` INT,- `price` INT,- PRIMARY KEY(`id`)- );;- newSchema: |- CREATE TABLE `author` (- `id` INT,- `name` VARCHAR(255),- PRIMARY KEY(`id`)- );- diff: |+- DROP TABLE IF EXISTS `book`;-- CREATE TABLE IF NOT EXISTS `author` (- `id` INT,- `name` VARCHAR(255),- PRIMARY KEY(`id`)- );--- oldSchema: |- CREATE TABLE `book` (- `id` INT,- `price` INT,- PRIMARY KEY(`id`)- );- CREATE TABLE `author` (- `id` INT,- `name` VARCHAR(255),- PRIMARY KEY(`id`)- );- newSchema: |- CREATE TABLE `book` (- `id` INT,- `price` INT,- PRIMARY KEY(`id`)- );- CREATE TABLE `author` (- `id` INT,- `name` VARCHAR(255),- PRIMARY KEY(`id`)- );- diff: ""-- oldSchema: |- CREATE TABLE `book` (- `id` INT,- `price` INT,- PRIMARY KEY(`id`),- CONSTRAINT `fk_price_id` FOREIGN KEY (`price`) REFERENCES price(`id`)- );- CREATE TABLE `price` (- `id` INT,- PRIMARY KEY(`id`)- );- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- );- diff: |+- ALTER TABLE `book` DROP FOREIGN KEY `fk_price_id`;-- DROP TABLE IF EXISTS `price`;-- ALTER TABLE `book` DROP COLUMN `price`;-diff --git a/backend/plugin/parser/mysql/test-data/differ/test_differ_tableoption.yaml b/backend/plugin/parser/mysql/test-data/differ/test_differ_tableoption.yamldeleted file mode 100644index 2f3ddd6a77..0000000000--- a/backend/plugin/parser/mysql/test-data/differ/test_differ_tableoption.yaml+++ /dev/null@@ -1,485 +0,0 @@-# AUTO_INCREMENT-- oldSchema: |- CREATE TABLE `book` (- `id` INT AUTO_INCREMENT,- PRIMARY KEY(`id`)- ) AUTO_INCREMENT = 4;- newSchema: |- CREATE TABLE `book` (- `id` INT AUTO_INCREMENT,- PRIMARY KEY(`id`)- ) AUTO_INCREMENT = 10;- diff: |+- ALTER TABLE `book` AUTO_INCREMENT = 10;--- oldSchema: |- CREATE TABLE `book` (- `id` INT AUTO_INCREMENT,- PRIMARY KEY(`id`)- ) AUTO_INCREMENT = 4;- newSchema: |- CREATE TABLE `book` (- `id` INT AUTO_INCREMENT,- PRIMARY KEY(`id`)- );- diff: |+- ALTER TABLE `book` AUTO_INCREMENT = 0;--- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) AVG_ROW_LENGTH = 1;- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) AVG_ROW_LENGTH = 2;- diff: |+- ALTER TABLE `book` AUTO_INCREMENT = 2;--# AVG_ROW_LENGTH-- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) AVG_ROW_LENGTH = 1;- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- );- diff: |+- ALTER TABLE `book` AVG_ROW_LENGTH = 0;--- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) AVG_ROW_LENGTH = 1;- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) AVG_ROW_LENGTH = 2;- diff: |+- ALTER TABLE `book` AVG_ROW_LENGTH = 2;--# DEFAULT CHARSET-- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) DEFAULT CHARACTER SET = utf8;- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) DEFAULT CHARACTER SET = utf8mb4;- diff: |+- ALTER TABLE `book` DEFAULT CHARACTER SET = utf8mb4;--- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) DEFAULT CHARSET = utf8;- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) DEFAULT CHARACTER SET = utf8;- diff: ""--- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) DEFAULT CHARSET = utf8;- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- );- diff: ""--# DEFAULT COLLATE-- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) DEFAULT COLLATE = latin1_swedish_ci;- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) DEFAULT COLLATE = utf8mb4_general_ci;- diff: |+- ALTER TABLE `book` DEFAULT COLLATE = utf8mb4_general_ci;--- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) DEFAULT COLLATE = latin1_swedish_ci;- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- );- diff:--# CHECKSUM-- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) CHECKSUM = 1;- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) CHECKSUM = 0;- diff: |+- ALTER TABLE `book` CHECKSUM = 0;--- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) CHECKSUM = 1;- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- );- diff: |+- ALTER TABLE `book` CHECKSUM = 0;--# COMMENT-- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) COMMENT = 'old';- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) COMMENT = 'new';- diff: |+- ALTER TABLE `book` COMMENT = 'new';--- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) COMMENT = 'old';- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- );- diff: |+- ALTER TABLE `book` COMMENT = '';--# COMPRESSION-- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) COMPRESSION = 'LZ4';- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) COMPRESSION = 'ZLIB';- diff: |+- ALTER TABLE `book` COMPRESSION = 'ZLIB';--- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) COMPRESSION = 'LZ4';- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- );- diff: |+- ALTER TABLE `book` COMPRESSION = 'None';--# CONNECTION-- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) CONNECTION = 'old';- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- );- diff: |+- ALTER TABLE `book` CONNECTION = '';--- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) CONNECTION = 'old';- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) CONNECTION = 'new';- diff: |+- ALTER TABLE `book` CONNECTION = 'new';--# DELAY_KEY_WRITE-- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) DELAY_KEY_WRITE = 1;- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) DELAY_KEY_WRITE = 0;- diff: |+- ALTER TABLE `book` DELAY_KEY_WRITE = 0;--- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) DELAY_KEY_WRITE = 1;- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- );- diff: |+- ALTER TABLE `book` DELAY_KEY_WRITE = 0;--# ENCRYPTION-- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) ENCRYPTION = 'Y';- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) ENCRYPTION = 'N' ;- diff: |+- ALTER TABLE `book` ENCRYPTION = 'N';--- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) ENCRYPTION = 'Y';- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- );- diff: |+- ALTER TABLE `book` ENCRYPTION = 'N';--# INSERT_METHOD-- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) INSERT_METHOD = LAST;- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) INSERT_METHOD = FIRST;- diff: |+- ALTER TABLE `book` INSERT_METHOD = FIRST;--- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) INSERT_METHOD = LAST;- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- );- diff: |+- ALTER TABLE `book` INSERT_METHOD = NO;--# MAX_ROWS-- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) MAX_ROWS = 100;- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) MAX_ROWS = 200;- diff: |+- ALTER TABLE `book` MAX_ROWS = 200;--- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) MAX_ROWS = 100;- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- );- diff: |+- ALTER TABLE `book` MAX_ROWS = 0;--- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) MAX_ROWS = 100;- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- );- diff: |+- ALTER TABLE `book` MAX_ROWS = 0;--- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) MAX_ROWS = 100;- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- );- diff: |+- ALTER TABLE `book` MAX_ROWS = 0;--# MIN_ROWS-- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) MIN_ROWS = 100;- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- );- diff: |+- ALTER TABLE `book` MIN_ROWS = 0;--- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) MIN_ROWS = 100;- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) MIN_ROWS = 200;- diff: |+- ALTER TABLE `book` MIN_ROWS = 200;--# PACK_KEYS-- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) PACK_KEYS = 1;- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- );- diff: |+- ALTER TABLE `book` PACK_KEYS = DEFAULT;--# ROW_FORMAT-- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) ROW_FORMAT = DYNAMIC;- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) ROW_FORMAT = COMPRESSED;- diff: |+- ALTER TABLE `book` ROW_FORMAT = COMPRESSED;--- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) ROW_FORMAT = DYNAMIC;- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- );- diff: |+- ALTER TABLE `book` ROW_FORMAT = DEFAULT;--# STATS_AUTO_RECALC-- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) STATS_AUTO_RECALC = 1;- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) STATS_AUTO_RECALC = 0;- diff: |+- ALTER TABLE `book` STATS_AUTO_RECALC = 0;--- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) STATS_AUTO_RECALC = 1;- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- );- diff: |+- ALTER TABLE `book` STATS_AUTO_RECALC = DEFAULT;--# UNION-- oldSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) UNION = (`book2`);- newSchema: |- CREATE TABLE `book` (- `id` INT,- PRIMARY KEY(`id`)- ) UNION = (`book2`, `book3`);- diff: |+- ALTER TABLE `book` UNION = (`book2`, `book3`);----diff --git a/backend/plugin/parser/mysql/test-data/differ/test_differ_trigger.yaml b/backend/plugin/parser/mysql/test-data/differ/test_differ_trigger.yamldeleted file mode 100644index 036acc40ea..0000000000--- a/backend/plugin/parser/mysql/test-data/differ/test_differ_trigger.yaml+++ /dev/null@@ -1,45 +0,0 @@-- oldSchema: ""- newSchema: |- DELIMITER ;;- CREATE TRIGGER ins_sum BEFORE INSERT ON account- FOR EACH ROW SET @sum = @sum + NEW.amount;;- DELIMITER ;- diff: |+- DELIMITER ;;- CREATE TRIGGER ins_sum BEFORE INSERT ON account- FOR EACH ROW SET @sum = @sum + NEW.amount;;- DELIMITER ;--- oldSchema: |- DELIMITER ;;- CREATE TRIGGER ins_sum BEFORE INSERT ON account- FOR EACH ROW SET @sum = @sum + NEW.amount;;- DELIMITER ;- newSchema: ""- diff: |+- DROP TRIGGER IF EXISTS `ins_sum`;--- oldSchema: |- CREATE TABLE `account`(`acct_num` INT, `amount` DECIMAL(10,2));- CREATE DEFINER=`root`@`%` TRIGGER `ins_sum` BEFORE INSERT ON account FOR EACH ROW SET @sum = @sum + NEW.amount;- newSchema: |- CREATE TABLE `account`(`acct_num` INT, `amount` DECIMAL(10,2), `price` INT);- CREATE DEFINER=`root`@`%` TRIGGER `ins_sum` BEFORE INSERT ON account FOR EACH ROW SET @sum = sum + NEW.amount * NEW.price;- diff: |+- DROP TRIGGER IF EXISTS `ins_sum`;-- ALTER TABLE `account` ADD COLUMN `price` INT AFTER `amount`;-- DELIMITER ;;- CREATE DEFINER=`root`@`%` TRIGGER `ins_sum` BEFORE INSERT ON account FOR EACH ROW SET @sum = sum + NEW.amount * NEW.price;;- DELIMITER ;--- oldSchema: |- CREATE TABLE `account`(`acct_num` INT, `amount` DECIMAL(10,2));- CREATE DEFINER=`root`@`%` TRIGGER `ins_sum` BEFORE INSERT ON account FOR EACH ROW SET @sum = @sum + NEW.amount;- newSchema: |- CREATE TABLE `account`(`acct_num` INT, `amount` DECIMAL(10,2), `price` INT);- CREATE DEFINER=`root`@`%` TRIGGER `ins_sum` BEFORE INSERT ON account FOR EACH ROW SET @sum = @sum + NEW.amount;- diff: |+- ALTER TABLE `account` ADD COLUMN `price` INT AFTER `amount`;-diff --git a/backend/plugin/parser/mysql/test-data/differ/test_differ_view.yaml b/backend/plugin/parser/mysql/test-data/differ/test_differ_view.yamldeleted file mode 100644index 6d642a34d4..0000000000--- a/backend/plugin/parser/mysql/test-data/differ/test_differ_view.yaml+++ /dev/null@@ -1,91 +0,0 @@-- oldSchema: |- CREATE VIEW `a` AS SELECT 1 AS id, 1 AS name;- CREATE VIEW `a` AS SELECT `id`, `name` FROM `book`;- newSchema: |- CREATE VIEW `a` AS SELECT 1 AS id;- CREATE VIEW `a` AS SELECT `id` FROM `book`;- diff: |+- CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=CURRENT_USER SQL SECURITY DEFINER VIEW `a` AS SELECT `id` FROM `book`;--- oldSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(25));- CREATE VIEW `a` AS SELECT `id`, `name` FROM `book`;- newSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(25));- CREATE VIEW `a` AS SELECT `id` FROM `book`;- CREATE VIEW `b` AS SELECT `id` FROM `a`;- diff: |+- CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=CURRENT_USER SQL SECURITY DEFINER VIEW `b` AS SELECT SQL_NO_CACHE 1 AS `id`;-- CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=CURRENT_USER SQL SECURITY DEFINER VIEW `a` AS SELECT `id` FROM `book`;-- CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=CURRENT_USER SQL SECURITY DEFINER VIEW `b` AS SELECT `id` FROM `a`;--- oldSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(25));- CREATE VIEW `a` AS SELECT `id`, `name` FROM `book`;- newSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(25));- CREATE VIEW `a` AS SELECT `id` AS `a_id` FROM `book`;- CREATE VIEW `b` AS SELECT `a_id` AS `b_id` FROM `a`;- diff: |+- CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=CURRENT_USER SQL SECURITY DEFINER VIEW `b` AS SELECT SQL_NO_CACHE 1 AS `b_id`;-- CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=CURRENT_USER SQL SECURITY DEFINER VIEW `a` AS SELECT `id` AS `a_id` FROM `book`;-- CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=CURRENT_USER SQL SECURITY DEFINER VIEW `b` AS SELECT `a_id` AS `b_id` FROM `a`;--- oldSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(25));- CREATE VIEW `a` AS SELECT `id` FROM `book`;- newSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(25));- CREATE VIEW `a` AS SELECT * FROM `book`;- CREATE VIEW `b` AS SELECT * FROM `a`;- diff: |+- CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=CURRENT_USER SQL SECURITY DEFINER VIEW `b` AS SELECT SQL_NO_CACHE 1 AS `id`, 1 AS `name`;-- CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=CURRENT_USER SQL SECURITY DEFINER VIEW `a` AS SELECT * FROM `book`;-- CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=CURRENT_USER SQL SECURITY DEFINER VIEW `b` AS SELECT * FROM `a`;--- oldSchema: ""- newSchema: |- CREATE TABLE `book` (`id` INT, `name` VARCHAR(25));- CREATE TABLE `e` (`c` INT, `d` INT);- CREATE VIEW `a` AS WITH `cte` AS (SELECT `id`, `name` FROM `book`) SELECT `id`, `name` FROM `cte` UNION SELECT `c`, `d` FROM `e`;- diff: |+- CREATE TABLE IF NOT EXISTS `book` (`id` INT, `name` VARCHAR(25));-- CREATE TABLE IF NOT EXISTS `e` (`c` INT, `d` INT);-- CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=CURRENT_USER SQL SECURITY DEFINER VIEW `a` AS SELECT SQL_NO_CACHE 1 AS `id`, 1 AS `name`;-- CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=CURRENT_USER SQL SECURITY DEFINER VIEW `a` AS WITH `cte` AS (SELECT `id`, `name` FROM `book`) SELECT `id`, `name` FROM `cte` UNION SELECT `c`, `d` FROM `e`;--- oldSchema: |- CREATE TABLE `book1` (`id` INT);- CREATE VIEW `book` AS SELECT * FROM `book1`;- newSchema: |- CREATE TABLE `book2` (`id` INT);- CREATE VIEW `book` AS SELECT * FROM `book2`;- diff: |+- DROP TABLE IF EXISTS `book1`;-- CREATE TABLE IF NOT EXISTS `book2` (`id` INT);-- CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=CURRENT_USER SQL SECURITY DEFINER VIEW `book` AS SELECT * FROM `book2`;--- oldSchema: |- CREATE VIEW `order_incomes` AS SELECT `order_id`, `customer_name`, SUM((`ordered_quantity` * `product_price`)) AS `total` FROM `order_details` INNER JOIN `orders` USING (`order_id`) INNER JOIN `customers` USING (`customer_name`) GROUP BY `order_id`;- newSchema: |- CREATE VIEW order_incomes AS SELECT `order_id`, `customer_name`, SUM((`ordered_quantity` * `product_price`)) + 1 AS `total` FROM `order_details` INNER JOIN `orders` USING (`order_id`) INNER JOIN `customers` USING (`customer_name`) GROUP BY `order_id`;- diff: |+- CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=CURRENT_USER SQL SECURITY DEFINER VIEW `order_incomes` AS SELECT `order_id`, `customer_name`, SUM((`ordered_quantity` * `product_price`)) + 1 AS `total` FROM `order_details` INNER JOIN `orders` USING (`order_id`) INNER JOIN `customers` USING (`customer_name`) GROUP BY `order_id`;--- oldSchema: ""- newSchema: |- CREATE VIEW v1 AS SELECT * FROM t;- diff: |+- CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=CURRENT_USER SQL SECURITY DEFINER VIEW `v1` AS SELECT * FROM t;-diff --git a/backend/plugin/parser/pg/test-data/test_differ_constraint.yaml b/backend/plugin/parser/pg/test-data/test_differ_constraint.yamldeleted file mode 100644index 280c4f1c0d..0000000000--- a/backend/plugin/parser/pg/test-data/test_differ_constraint.yaml+++ /dev/null@@ -1,178 +0,0 @@-- oldSchema: |- CREATE TABLE public.order_details(id INT, order_id INT);- newSchema: |- CREATE TABLE public.order_details(id INT, order_id INT);- ALTER TABLE public.order_details ADD CONSTRAINT order_details_un_order_id UNIQUE (order_id);- diff: |+- ALTER TABLE "public"."order_details"- ADD CONSTRAINT "order_details_un_order_id" UNIQUE ("order_id");--- oldSchema: |- CREATE TABLE public.order_details(id INT, order_id INT);- ALTER TABLE public.order_details ADD CONSTRAINT order_details_un_order_id UNIQUE (order_id);- newSchema: |- CREATE TABLE public.order_details(id INT, order_id INT);- diff: |+- ALTER TABLE "public"."order_details"- DROP CONSTRAINT "order_details_un_order_id";--- oldSchema: |- CREATE TABLE public.order_details(id INT, order_id INT);- ALTER TABLE public.order_details ADD CONSTRAINT order_details_un_order_id UNIQUE (id, order_id);- newSchema: |- CREATE TABLE public.order_details(id INT, order_id INT);- ALTER TABLE public.order_details ADD CONSTRAINT order_details_un_order_id UNIQUE (order_id);- diff: |+- ALTER TABLE "public"."order_details"- DROP CONSTRAINT "order_details_un_order_id";-- ALTER TABLE "public"."order_details"- ADD CONSTRAINT "order_details_un_order_id" UNIQUE ("order_id");--- oldSchema: |- CREATE TABLE public.order_details(id INT, order_id INT);- ALTER TABLE public.order_details ADD CONSTRAINT order_details_un_order_id UNIQUE (order_id);- newSchema: |- CREATE TABLE public.order_details(id INT, order_id INT);- ALTER TABLE public.order_details ADD CONSTRAINT order_details_un_order_id UNIQUE (id, order_id);- diff: |+- ALTER TABLE "public"."order_details"- DROP CONSTRAINT "order_details_un_order_id";-- ALTER TABLE "public"."order_details"- ADD CONSTRAINT "order_details_un_order_id" UNIQUE ("id", "order_id");--- oldSchema: |- CREATE TABLE public.order_details(id INT, order_id INT, email_id INT);- ALTER TABLE public.order_details ADD CONSTRAINT order_details_un_order_id UNIQUE (id, order_id, email_id);- newSchema: |- CREATE TABLE public.order_details(id INT, order_id INT);- ALTER TABLE public.order_details ADD CONSTRAINT order_details_un_order_id UNIQUE (id, order_id);- diff: |+- ALTER TABLE "public"."order_details"- DROP CONSTRAINT "order_details_un_order_id";-- ALTER TABLE "public"."order_details"- DROP COLUMN "email_id";-- ALTER TABLE "public"."order_details"- ADD CONSTRAINT "order_details_un_order_id" UNIQUE ("id", "order_id");--- oldSchema: |- CREATE TABLE public.order_details(id INT, order_id INT);- newSchema: |- CREATE TABLE public.order_details(id INT, order_id INT);- ALTER TABLE public.order_details ADD CONSTRAINT order_details_pk PRIMARY KEY (order_id);- diff: |+- ALTER TABLE "public"."order_details"- ADD CONSTRAINT "order_details_pk" PRIMARY KEY ("order_id");--- oldSchema: |- CREATE TABLE public.order_details(id INT, order_id INT);- ALTER TABLE public.order_details ADD CONSTRAINT order_details_pk PRIMARY KEY (order_id);- newSchema: |- CREATE TABLE public.order_details(id INT, order_id INT);- diff: |+- ALTER TABLE "public"."order_details"- DROP CONSTRAINT "order_details_pk";--- oldSchema: |- CREATE TABLE public.order_details(id INT, order_id INT);- ALTER TABLE public.order_details ADD CONSTRAINT order_details_pk PRIMARY KEY (id, order_id);- newSchema: |- CREATE TABLE public.order_details(id INT, order_id INT);- ALTER TABLE public.order_details ADD CONSTRAINT order_details_pk PRIMARY KEY (order_id);- diff: |+- ALTER TABLE "public"."order_details"- DROP CONSTRAINT "order_details_pk";-- ALTER TABLE "public"."order_details"- ADD CONSTRAINT "order_details_pk" PRIMARY KEY ("order_id");--- oldSchema: |- CREATE TABLE public.order_details(id INT, order_id INT);- ALTER TABLE public.order_details ADD CONSTRAINT order_details_pk PRIMARY KEY (order_id);- newSchema: |- CREATE TABLE public.order_details(id INT, order_id INT);- ALTER TABLE public.order_details ADD CONSTRAINT order_details_pk PRIMARY KEY (id, order_id);- diff: |+- ALTER TABLE "public"."order_details"- DROP CONSTRAINT "order_details_pk";-- ALTER TABLE "public"."order_details"- ADD CONSTRAINT "order_details_pk" PRIMARY KEY ("id", "order_id");--- oldSchema: |- CREATE TABLE public.order_details(id INT, order_id INT, email_id INT);- ALTER TABLE public.order_details ADD CONSTRAINT order_details_pk PRIMARY KEY (id, order_id, email_id);- newSchema: |- CREATE TABLE public.order_details(id INT, order_id INT);- ALTER TABLE public.order_details ADD CONSTRAINT order_details_pk PRIMARY KEY (id, order_id);- diff: |+- ALTER TABLE "public"."order_details"- DROP CONSTRAINT "order_details_pk";-- ALTER TABLE "public"."order_details"- DROP COLUMN "email_id";-- ALTER TABLE "public"."order_details"- ADD CONSTRAINT "order_details_pk" PRIMARY KEY ("id", "order_id");--- oldSchema: |- CREATE TABLE public.circles(a circle, b circle, c integer);- ALTER TABLE public.circles ADD CONSTRAINT circles_a_b_excl EXCLUDE USING gist (a WITH &&, b WITH &&) WHERE (c > 0);- newSchema: |- CREATE TABLE public.circles(a circle, b circle, c integer);- diff: |+- ALTER TABLE "public"."circles"- DROP CONSTRAINT "circles_a_b_excl";--- oldSchema: |- CREATE TABLE public.circles(a circle, b circle, c integer);- newSchema: |- CREATE TABLE public.circles(a circle, b circle, c integer);- ALTER TABLE public.circles ADD CONSTRAINT circles_a_b_excl EXCLUDE USING gist (a WITH &&, b WITH &&) WHERE (c > 0);- diff: |+- ALTER TABLE "public"."circles"- ADD CONSTRAINT "circles_a_b_excl" EXCLUDE USING gist (a WITH &&, b WITH &&) WHERE (c > 0);--- oldSchema: |- CREATE TABLE public.circles(a circle, b circle, c integer);- ALTER TABLE public.circles ADD CONSTRAINT circles_a_b_excl EXCLUDE USING gist (a WITH &&) WHERE (c > 25);- newSchema: |- CREATE TABLE public.circles(a circle, b circle, c integer);- ALTER TABLE public.circles ADD CONSTRAINT circles_a_b_excl EXCLUDE USING gist (a WITH &&, b WITH &&) WHERE (c > 0);- diff: |+- ALTER TABLE "public"."circles"- DROP CONSTRAINT "circles_a_b_excl";-- ALTER TABLE "public"."circles"- ADD CONSTRAINT "circles_a_b_excl" EXCLUDE USING gist (a WITH &&, b WITH &&) WHERE (c > 0);--- oldSchema: |- CREATE TABLE public.t1(a int, b int, c int);- create table public.t2(a int, b int, c int);- create unique index uk_1 on public.t1 (a, b, c);- create unique index uk_2 on public.t1 (a, b);- alter table public.t2 add constraint fk_1 foreign key (a, b, c) references public.t2(a, b, c);- alter table public.t2 add constraint fk_3 foreign key (a, b) references public.t2(a, b);- newSchema: |- CREATE TABLE public.t1(a int, b int, c int);- create table public.t2(a int, b int, c int);- create unique index uk_1 on public.t1 (a, b, c);- create unique index uk_2 on public.t1 (a, b);- alter table public.t2 add constraint fk_2 foreign key (a, b, c) references public.t2(a, b, c);- alter table public.t2 add constraint fk_3 foreign key (a, b, c) references public.t2(a, b, c);- diff: |+- ALTER TABLE "public"."t2"- DROP CONSTRAINT "fk_3";-- ALTER TABLE "public"."t2"- DROP CONSTRAINT "fk_1";-- ALTER TABLE "public"."t2"- ADD CONSTRAINT "fk_2" FOREIGN KEY ("a", "b", "c") REFERENCES "public"."t2" ("a", "b", "c");-- ALTER TABLE "public"."t2"- ADD CONSTRAINT "fk_3" FOREIGN KEY ("a", "b", "c") REFERENCES "public"."t2" ("a", "b", "c");-diff --git a/backend/plugin/parser/pg/test-data/test_differ_data.yaml b/backend/plugin/parser/pg/test-data/test_differ_data.yamldeleted file mode 100644index a02041c8a8..0000000000--- a/backend/plugin/parser/pg/test-data/test_differ_data.yaml+++ /dev/null@@ -1,604 +0,0 @@-- oldSchema: |- CREATE TABLE public.t1(a int, b int, c int);- CREATE TABLE public.t3(a int, b int, c int);- CREATE FUNCTION public.f1() RETURNS public.t3 AS $$- BEGIN- RETURN (1, 1, 1);- END;- $$ LANGUAGE plpgsql;- newSchema: |- CREATE TABLE public.t1(a int, b int, c int);- CREATE TABLE public.t2(a int, b int, c int);- CREATE FUNCTION public.f1() RETURNS public.t2 AS $$- BEGIN- RETURN (1, 1, 1);- END;- $$ LANGUAGE plpgsql;- diff: |+- SET check_function_bodies = false;-- DROP FUNCTION "public"."f1"();-- DROP TABLE "public"."t3";-- CREATE TABLE "public"."t2" (- "a" integer,- "b" integer,- "c" integer- );-- CREATE FUNCTION public.f1() RETURNS public.t2 AS $$- BEGIN- RETURN (1, 1, 1);- END;- $$ LANGUAGE plpgsql;--- oldSchema: |- CREATE TABLE public.t1(a int, b int, c int);- CREATE VIEW public.v1 AS SELECT t1.a, t1.b, t1.c FROM public.t1;- CREATE MATERIALIZED VIEW public.v2 AS SELECT v1.a, v1.b, v1.c FROM public.v1;- CREATE VIEW public.v3 AS SELECT v2.a, v2.b, v2.c FROM public.v2;- newSchema: |- CREATE TABLE public.t1(a int, b int, c int);- CREATE VIEW public.v1 AS SELECT t1.a, t1.b, t1.c FROM public.t1;- CREATE MATERIALIZED VIEW public.v2 AS SELECT t1.a, t1.b, t1.c FROM public.t1;- CREATE VIEW public.v4 AS SELECT v2.a, v2.b, v2.c FROM public.v2;- diff: |- DROP VIEW "public"."v3";-- DROP MATERIALIZED VIEW "public"."v2";-- CREATE MATERIALIZED VIEW public.v2 AS SELECT t1.a, t1.b, t1.c FROM public.t1;- CREATE OR REPLACE VIEW public.v4 AS SELECT v2.a, v2.b, v2.c FROM public.v2;-- oldSchema: |- CREATE TABLE public.t1(a int, b int, c int);- CREATE VIEW public.v1 AS SELECT t1.a, t1.b, t1.c FROM public.t1;- CREATE VIEW public.v2 AS SELECT v1.a, v1.b, v1.c FROM public.v1;- CREATE VIEW public.v3 AS SELECT v2.a, v2.b, v2.c FROM public.v2;- comment on column public.v1.a is 'comment with ''; test escape';- comment on column public.v2.b is 'comment with ''; test escape for b';- comment on column public.v3.a is 'comment with ''; test escape';-- comment on view public.v1 is 'comment with ''; test escape';- comment on view public.v2 is 'comment with ''; test escape for b';- comment on view public.v3 is 'comment with ''; test escape';- newSchema: |- CREATE TABLE public.t1(a int, b int, c int);- CREATE VIEW public.v1 AS SELECT t1.a, t1.b, t1.c FROM public.t1;- CREATE VIEW public.v2 AS SELECT t1.a, t1.b, t1.c FROM public.t1;- CREATE VIEW public.v4 AS SELECT v2.a, v2.b, v2.c FROM public.v2;- comment on column public.v1.a is 'comment with ''; test escape';- comment on column public.v2.b is 'comment with ''sdkfjaslkdjf; test escape for b';- comment on column public.v4.a is 'comment with ''; test escape';-- comment on view public.v1 is 'comment with ''; test escape';- comment on view public.v2 is 'comment with ''lkdjfaldsjf; test escape for b';- comment on view public.v4 is 'comment with ''; test escape';- diff: |+- DROP VIEW "public"."v3";-- DROP VIEW "public"."v2";-- CREATE OR REPLACE VIEW public.v2 AS SELECT t1.a, t1.b, t1.c FROM public.t1;- CREATE OR REPLACE VIEW public.v4 AS SELECT v2.a, v2.b, v2.c FROM public.v2;- COMMENT ON COLUMN "public"."v2"."b" IS 'comment with ''sdkfjaslkdjf; test escape for b';-- COMMENT ON COLUMN "public"."v4"."a" IS 'comment with ''; test escape';-- COMMENT ON VIEW "public"."v2" IS 'comment with ''lkdjfaldsjf; test escape for b';-- COMMENT ON VIEW "public"."v4" IS 'comment with ''; test escape';--- oldSchema: |- CREATE TABLE public.projects ();- newSchema: |- CREATE TABLE public.users (- id serial PRIMARY KEY,- username TEXT NOT NULL- );- CREATE TABLE public.projects ();- CREATE TABLE public.repositories (- id serial PRIMARY KEY- );- diff: |+- CREATE TABLE "public"."repositories" (- "id" serial PRIMARY KEY- );-- CREATE TABLE "public"."users" (- "id" serial PRIMARY KEY,- "username" text NOT NULL- );--- oldSchema: CREATE TABLE public.t1(a int, b char(20), c int);- newSchema: CREATE TABLE public.t1(a int);- diff: |+- ALTER TABLE "public"."t1"- DROP COLUMN "b",- DROP COLUMN "c";--- oldSchema: CREATE TABLE public.t1(a int);- newSchema: CREATE TABLE public.t1(a int, b char(20), c int)- diff: |+- ALTER TABLE "public"."t1"- ADD COLUMN "b" character(20),- ADD COLUMN "c" integer;--- oldSchema: create table public.t1(a int, b bigint, c serial);- newSchema: create table public.t1(a varchar(20), b serial, c bigint, d char(30))- diff: |+- ALTER TABLE "public"."t1"- ADD COLUMN "d" character(30);-- ALTER TABLE "public"."t1"- ALTER COLUMN "a" SET DATA TYPE character varying(20);-- ALTER TABLE "public"."t1"- ALTER COLUMN "b" SET DATA TYPE serial;-- ALTER TABLE "public"."t1"- ALTER COLUMN "c" SET DATA TYPE bigint;--- oldSchema: create table public.t1(a int, b int NOT NULL)- newSchema: create table public.t1(a int NOT NULL, b int)- diff: |+- ALTER TABLE "public"."t1"- ALTER COLUMN "a" SET NOT NULL;-- ALTER TABLE "public"."t1"- ALTER COLUMN "b" DROP NOT NULL;--- oldSchema: create table public.t1(a int, b int DEFAULT 1+2, c int DEFAULT 1)- newSchema: create table public.t1(a int DEFAULT 1, b int, c int DEFAULT 1+2+3+4)- diff: |+- ALTER TABLE "public"."t1"- ALTER COLUMN "b" DROP DEFAULT;-- ALTER TABLE "public"."t1"- ALTER COLUMN "a" SET DEFAULT 1;-- ALTER TABLE "public"."t1"- ALTER COLUMN "c" SET DEFAULT ((1 + 2) + 3) + 4;--- oldSchema: |- create schema s1;- create table s1.t1(a int);- create table s1.t2(a int, b int);- create schema s2;- create table s2.t3(a int);- create table s2.t4(a int);- newSchema: |- create schema s1;- create table s1.t2(a int);- create table s1.t3(a int, b int);- create schema s2;- create table s2.t2(a int);- create table s2.t3(a int);- diff: |+- DROP TABLE "s1"."t1";-- DROP TABLE "s2"."t4";-- ALTER TABLE "s1"."t2"- DROP COLUMN "b";-- CREATE TABLE "s1"."t3" (- "a" integer,- "b" integer- );-- CREATE TABLE "s2"."t2" (- "a" integer- );--- oldSchema: |- create table public.t1(- a int,- b int,- constraint check_a check(a > b),- constraint check_b check(b > 1)- );- newSchema: |- create table public.t1(- a int,- b int,- constraint check_b check(b > a),- constraint check_c check(a > 1)- )- diff: |+- ALTER TABLE "public"."t1"- DROP CONSTRAINT "check_b",- DROP CONSTRAINT "check_a";-- ALTER TABLE "public"."t1"- ADD CONSTRAINT "check_b" CHECK (b > a),- ADD CONSTRAINT "check_c" CHECK (a > 1);--- oldSchema: |- create table public.t1(- a int,- b int,- constraint check_a check(a > 1),- constraint check_b check(b > 1)- );- newSchema: |- create table public.t1(- a int,- b int,- constraint check_b check(b > 1),- constraint check_a check(a > 1)- )- diff: ""-- oldSchema: |- CREATE TABLE public.t1(a int, b int, c int);- CREATE INDEX idx1 ON public.t1 USING btree (a, b, (c+1));- CREATE INDEX idx2 ON public.t1 USING hash (a);- newSchema: |- CREATE TABLE public.t1(a int, b int, c int);- CREATE INDEX idx2 ON public.t1 USING btree (a);- CREATE INDEX idx3 ON public.t1 USING btree (a, b);- diff: |+- DROP INDEX "public"."idx2";-- DROP INDEX "public"."idx1";-- CREATE INDEX idx2 ON public.t1 USING btree (a);-- CREATE INDEX idx3 ON public.t1 USING btree (a, b);--- oldSchema: |- CREATE TABLE public.t (a int, b varchar(20), c boolean, d bit(2), e jsonb);- newSchema: |- CREATE TABLE public.t (a integer, b varchar(20), c boolean, d bit(2), e jsonb);- diff: ""-- oldSchema: |- CREATE TABLE public.t (a int8, b varchar(220), c date, d varbit(2), e json, f bit(2));- newSchema: |- CREATE TABLE public.t (a integer, b varchar(20), c boolean, d bit(2), e jsonb, f bit(4));- diff: |+- ALTER TABLE "public"."t"- ALTER COLUMN "a" SET DATA TYPE integer;-- ALTER TABLE "public"."t"- ALTER COLUMN "b" SET DATA TYPE character varying(20);-- ALTER TABLE "public"."t"- ALTER COLUMN "c" SET DATA TYPE boolean;-- ALTER TABLE "public"."t"- ALTER COLUMN "d" SET DATA TYPE pg_catalog.bit(2);-- ALTER TABLE "public"."t"- ALTER COLUMN "e" SET DATA TYPE jsonb;-- ALTER TABLE "public"."t"- ALTER COLUMN "f" SET DATA TYPE pg_catalog.bit(4);--- oldSchema: |- create schema schema1;- create table schema1.t1(a int, b int, c int);- create index idx_t1_a on schema1.t1(a);- create sequence schema1.sequence1- NO MINVALUE- NO MAXVALUE- START WITH 1;- alter sequence schema1.sequence1 owned by schema1.t1.a;- alter table schema1.t1 alter column a set default nextval('schema1.sequence1'::regclass);- newSchema: ""- diff: |+- ALTER SEQUENCE "schema1"."sequence1"- OWNED BY NONE;-- DROP TABLE "schema1"."t1";-- DROP SEQUENCE "schema1"."sequence1";-- DROP SCHEMA "schema1";--- oldSchema: |- CREATE SCHEMA s1;- CREATE EXTENSION IF NOT EXISTS pg_trgm WITH SCHEMA public;- CREATE EXTENSION IF NOT EXISTS e2 WITH SCHEMA s1;- CREATE EXTENSION IF NOT EXISTS e4 WITH SCHEMA public;- newSchema: |- CREATE SCHEMA s2;- CREATE EXTENSION IF NOT EXISTS e2 WITH SCHEMA s2;- CREATE EXTENSION IF NOT EXISTS e3 WITH SCHEMA public;- CREATE EXTENSION IF NOT EXISTS e4 WITH SCHEMA public;- diff: |+- DROP EXTENSION "pg_trgm", "e2";-- DROP SCHEMA "s1";-- CREATE SCHEMA "s2";-- CREATE EXTENSION IF NOT EXISTS e2 WITH SCHEMA s2;-- CREATE EXTENSION IF NOT EXISTS e3 WITH SCHEMA public;--- oldSchema: |- CREATE EXTENSION IF NOT EXISTS pg_trgm WITH SCHEMA public;- CREATE TABLE public.test_trgm (t text, t2 text);- CREATE INDEX trgm_idx ON public.test_trgm USING gin (t public.gin_trgm_ops);- CREATE INDEX trgm_idx2 ON public.test_trgm USING gin (t public.gin_trgm_ops);- CREATE INDEX trgm_idx3 ON public.test_trgm USING gin (t public.gin_trgm_ops);- newSchema: |- CREATE EXTENSION IF NOT EXISTS pg_trgm WITH SCHEMA public;- CREATE TABLE public.test_trgm (t text, t2 text);- CREATE INDEX trgm_idx ON public.test_trgm USING gin (t public.gin_trgm_ops);- CREATE INDEX trgm_idx2 ON public.test_trgm USING gin (t2 public.gin_trgm_ops);- diff: |+- DROP INDEX "public"."trgm_idx2";-- DROP INDEX "public"."trgm_idx3";-- CREATE INDEX trgm_idx2 ON public.test_trgm USING gin (t2 public.gin_trgm_ops);--- oldSchema: |- CREATE FUNCTION public.trigger_update_updated_ts() RETURNS trigger- LANGUAGE plpgsql- AS $$- BEGIN- NEW.updated_ts = extract(epoch from now());- RETURN NEW;- END;- $$;- CREATE FUNCTION public.f1() RETURNS trigger- LANGUAGE plpgsql- AS $$- BEGIN- NEW.updated_ts = extract(epoch from now());- RETURN NEW;- END;- $$;- CREATE FUNCTION public.f1(int) RETURNS trigger- LANGUAGE plpgsql- AS $$- BEGIN- NEW.updated_ts = extract(epoch from now());- RETURN NEW;- END;- $$;- newSchema: |- CREATE FUNCTION public.trigger_update_updated_ts() RETURNS trigger- LANGUAGE plpgsql- AS $$- BEGIN- NEW.updated_ts = extract(epoch from now());- RETURN NEW;- END;- $$;- CREATE FUNCTION public.f1(int, int, int) RETURNS trigger- LANGUAGE plpgsql- AS $$- BEGIN- NEW.updated_ts = extract(epoch from now());- RETURN NEW;- END;- $$;- CREATE FUNCTION public.f1(int) RETURNS trigger- LANGUAGE plpgsql- AS $$- BEGIN- NEW.ts = extract(epoch from now());- RETURN NEW;- END;- $$;- diff: |+- SET check_function_bodies = false;-- DROP FUNCTION "public"."f1"();-- DROP FUNCTION "public"."f1"(integer);-- CREATE FUNCTION public.f1(int, int, int) RETURNS trigger- LANGUAGE plpgsql- AS $$- BEGIN- NEW.updated_ts = extract(epoch from now());- RETURN NEW;- END;- $$;-- CREATE FUNCTION public.f1(int) RETURNS trigger- LANGUAGE plpgsql- AS $$- BEGIN- NEW.ts = extract(epoch from now());- RETURN NEW;- END;- $$;--- oldSchema: |- CREATE TABLE public.t (a bigint);- CREATE FUNCTION public.f1(int, int, int) RETURNS trigger- LANGUAGE plpgsql- AS $$- BEGIN- NEW.a = extract(epoch from now());- RETURN NEW;- END;- $$;- CREATE FUNCTION public.f2(int, int, int) RETURNS trigger- LANGUAGE plpgsql- AS $$- BEGIN- NEW.a = extract(epoch from now());- RETURN NEW;- END;- $$;- CREATE TRIGGER update1 BEFORE UPDATE ON public.t FOR EACH ROW EXECUTE FUNCTION public.f1();- CREATE TRIGGER update2 BEFORE UPDATE ON public.t FOR EACH ROW EXECUTE FUNCTION public.f1();- CREATE TRIGGER update3 BEFORE UPDATE ON public.t FOR EACH ROW EXECUTE FUNCTION public.f1();- newSchema: |- CREATE TABLE public.t (a bigint);- CREATE FUNCTION public.f1(int, int, int) RETURNS trigger- LANGUAGE plpgsql- AS $$- BEGIN- NEW.a = extract(epoch from now());- RETURN NEW;- END;- $$;- CREATE FUNCTION public.f2(int, int, int) RETURNS trigger- LANGUAGE plpgsql- AS $$- BEGIN- NEW.a = extract(epoch from now());- RETURN NEW;- END;- $$;- CREATE TRIGGER update1 BEFORE UPDATE ON public.t FOR EACH ROW EXECUTE FUNCTION public.f1();- CREATE TRIGGER update3 BEFORE UPDATE ON public.t FOR EACH ROW EXECUTE FUNCTION public.f2();- CREATE TRIGGER update4 BEFORE UPDATE ON public.t FOR EACH ROW EXECUTE FUNCTION public.f1();- diff: |+- DROP TRIGGER "update3" ON "public"."t";-- DROP TRIGGER "update2" ON "public"."t";-- CREATE TRIGGER update3 BEFORE UPDATE ON public.t FOR EACH ROW EXECUTE FUNCTION public.f2();-- CREATE TRIGGER update4 BEFORE UPDATE ON public.t FOR EACH ROW EXECUTE FUNCTION public.f1();--- oldSchema: |- CREATE TYPE public.tp1 AS ENUM ('a', 'b', 'c');- CREATE TYPE public.tp2 AS ENUM ('a', 'b', 'c');- CREATE TYPE public.tp3 AS ENUM ('a', 'b', 'e');- CREATE TABLE public.t1(a public.tp1, b public.tp2, c public.tp3)- newSchema: |- CREATE TYPE public.tp1 AS ENUM ('a', 'b', 'c');- CREATE TYPE public.tp3 AS ENUM ('a', 'b', 'c', 'd');- CREATE TYPE public.tp4 AS ENUM ('a', 'b', 'c');- CREATE TABLE public.t1(a public.tp1, b public.tp3, c public.tp4)- diff: |+- DROP TYPE "public"."tp3";-- DROP TYPE "public"."tp2";-- CREATE TYPE public.tp3 AS ENUM ('a', 'b', 'c', 'd');-- CREATE TYPE public.tp4 AS ENUM ('a', 'b', 'c');-- ALTER TABLE "public"."t1"- ALTER COLUMN "b" SET DATA TYPE public.tp3;-- ALTER TABLE "public"."t1"- ALTER COLUMN "c" SET DATA TYPE public.tp4;--- oldSchema: |- create type public.enum1 as enum ('a', 'b', 'c');- create table public.t1 (a enum1);- newSchema: |- create type public.enum1 as enum ('1', '2', 'a', '3', '4', 'b', '5', 'c', '6', '7');- create table public.t1 (a enum1);- diff: |+- ALTER TYPE "public"."enum1" ADD VALUE '2' BEFORE 'a';-- ALTER TYPE "public"."enum1" ADD VALUE '1' BEFORE '2';-- ALTER TYPE "public"."enum1" ADD VALUE '3' AFTER 'a';-- ALTER TYPE "public"."enum1" ADD VALUE '4' AFTER '3';-- ALTER TYPE "public"."enum1" ADD VALUE '5' AFTER 'b';-- ALTER TYPE "public"."enum1" ADD VALUE '6' AFTER 'c';-- ALTER TYPE "public"."enum1" ADD VALUE '7' AFTER '6';--- oldSchema: |- create type public.enum1 as enum ();- create table public.t1 (a enum1);- newSchema: |- create type public.enum1 as enum ('1', '2', 'a', '3', '4', 'b', '5', 'c', '6', '7');- create table public.t1 (a enum1);- diff: |+- ALTER TYPE "public"."enum1" ADD VALUE '1';-- ALTER TYPE "public"."enum1" ADD VALUE '2';-- ALTER TYPE "public"."enum1" ADD VALUE 'a';-- ALTER TYPE "public"."enum1" ADD VALUE '3';-- ALTER TYPE "public"."enum1" ADD VALUE '4';-- ALTER TYPE "public"."enum1" ADD VALUE 'b';-- ALTER TYPE "public"."enum1" ADD VALUE '5';-- ALTER TYPE "public"."enum1" ADD VALUE 'c';-- ALTER TYPE "public"."enum1" ADD VALUE '6';-- ALTER TYPE "public"."enum1" ADD VALUE '7';--- oldSchema: |- create extension abc with schema pg_catalog;- create table "public"."t1" ("a" int);- newSchema: create table "public"."t2" ("a" int);- diff: |+- DROP TABLE "public"."t1";-- CREATE TABLE "public"."t2" (- "a" integer- );--- oldSchema: |-- create table "public"."t1" ("a" int);- comment on table "public"."t1" is 'comment with ''; test escape';- create table "public"."t2" ("a" int);- comment on table "public"."t2" is 'comment with ''; test escape';- create table "public"."t3" ("a" int);- create table "public"."t4" ("a" int);- comment on table "public"."t4" is 'comment with ''; test escape';- newSchema: |-- create table "public"."t1" ("a" int);- create table "public"."t2" ("a" int);- comment on table "public"."t2" is 'comment with ''; test escape';- create table "public"."t3" ("a" int);- comment on table "public"."t3" is 'comment with ''; test escape';- create table "public"."t4" ("a" int);- comment on table "public"."t4" is 'comment with ''; test escape for t4';- diff: |+- COMMENT ON TABLE "public"."t3" IS 'comment with ''; test escape';-- COMMENT ON TABLE "public"."t4" IS 'comment with ''; test escape for t4';-- COMMENT ON TABLE "public"."t1" IS '';--- oldSchema: |-- create table "public"."t1" ("a" int, b int, c int, d int);- comment on column public.t1.a is 'comment with ''; test escape';- comment on column public.t1.b is 'comment with ''; test escape for b';- comment on column public.t1.d is 'comment with ''; test escape';- newSchema: |-- create table "public"."t1" ("a" int, b int, c int, d int);- comment on column public.t1.c is 'comment with ''; test escape for c';- comment on column public.t1.b is 'comment with ''; test escape for b';- comment on column public.t1.d is 'comment with ''; test escape for d';- diff: |+- COMMENT ON COLUMN "public"."t1"."c" IS 'comment with ''; test escape for c';-- COMMENT ON COLUMN "public"."t1"."d" IS 'comment with ''; test escape for d';-- COMMENT ON COLUMN "public"."t1"."a" IS '';--- oldSchema: |-- CREATE TABLE public.t (- id integer NOT NULL- );- ALTER TABLE ONLY public.t ADD CONSTRAINT t_pkey PRIMARY KEY (id);- newSchema: ""- diff: |+- DROP TABLE "public"."t";--- oldSchema: |-- CREATE TABLE public.t (- id integer NOT NULL- );- CREATE INDEX hello ON public.t USING btree (id);- newSchema: ""- diff: |+- DROP TABLE "public"."t";-diff --git a/backend/plugin/parser/pg/test-data/test_differ_merge.yaml b/backend/plugin/parser/pg/test-data/test_differ_merge.yamldeleted file mode 100644index e4edd7acdd..0000000000--- a/backend/plugin/parser/pg/test-data/test_differ_merge.yaml+++ /dev/null@@ -1,28 +0,0 @@-- oldSchema: |- CREATE TABLE public.t (a INTEGER);- newSchema: |- CREATE TABLE public.t (a INTEGER);- ALTER TABLE ONLY public.t ALTER COLUMN a SET DEFAULT nextval('public.t_a_seq'::regclass);- diff: |+- ALTER TABLE "public"."t"- ALTER COLUMN "a" SET DEFAULT nextval('public.t_a_seq'::regclass);--- oldSchema: |- CREATE TABLE public.t (a INTEGER);- ALTER TABLE ONLY public.t ALTER COLUMN a SET DEFAULT nextval('public.t_a_seq'::regclass);- newSchema: |- CREATE TABLE public.t (a INTEGER);- ALTER TABLE ONLY public.t ALTER COLUMN a SET DEFAULT nextval('public.t_a_seq_2'::regclass);- diff: |+- ALTER TABLE "public"."t"- ALTER COLUMN "a" SET DEFAULT nextval('public.t_a_seq_2'::regclass);--- oldSchema: |- CREATE TABLE public.t (a INTEGER);- ALTER TABLE ONLY public.t ALTER COLUMN a SET DEFAULT nextval('public.t_a_seq'::regclass);- newSchema: |- CREATE TABLE public.t (a INTEGER);- diff: |+- ALTER TABLE "public"."t"- ALTER COLUMN "a" DROP DEFAULT;-diff --git a/backend/plugin/parser/pg/test-data/test_differ_schema.yaml b/backend/plugin/parser/pg/test-data/test_differ_schema.yamldeleted file mode 100644index f6ddb9df24..0000000000--- a/backend/plugin/parser/pg/test-data/test_differ_schema.yaml+++ /dev/null@@ -1,17 +0,0 @@-- oldSchema: CREATE SCHEMA s1; CREATE SCHEMA s2;- newSchema: CREATE SCHEMA s1;- diff: |+- DROP SCHEMA "s2";--- oldSchema: CREATE SCHEMA s1;- newSchema: CREATE SCHEMA s1; CREATE SCHEMA s2;- diff: |+- CREATE SCHEMA "s2";--- oldSchema: CREATE SCHEMA s1; CREATE SCHEMA s2;- newSchema: CREATE SCHEMA s2; CREATE SCHEMA s3;- diff: |+- DROP SCHEMA "s1";-- CREATE SCHEMA "s3";-diff --git a/backend/plugin/parser/pg/test-data/test_differ_sequence.yaml b/backend/plugin/parser/pg/test-data/test_differ_sequence.yamldeleted file mode 100644index d86e36897a..0000000000--- a/backend/plugin/parser/pg/test-data/test_differ_sequence.yaml+++ /dev/null@@ -1,94 +0,0 @@-- oldSchema: |- create table public.t2 (a int);- newSchema: |- create table public.t1 (a int);- create sequence public.s1- START WITH 1- INCREMENT BY 1- NO MINVALUE- NO MAXVALUE- CACHE 1;- alter sequence public.s1 owned by public.t1.a;- alter table public.t1 alter column a set default nextval('public.s1'::regclass);- diff: |+- DROP TABLE "public"."t2";-- CREATE SEQUENCE "public"."s1"- INCREMENT BY 1- NO MINVALUE- NO MAXVALUE- START WITH 1- CACHE 1;-- CREATE TABLE "public"."t1" (- "a" integer DEFAULT nextval('public.s1'::regclass)- );-- ALTER SEQUENCE "public"."s1"- OWNED BY "public"."t1"."a";--- oldSchema: |- create table public.t1 (a int);- create sequence public.s1- START WITH 1- INCREMENT BY 1- NO MINVALUE- NO MAXVALUE- CACHE 1;- alter sequence public.s1 owned by public.t1.a;- alter table public.t1 alter column a set default nextval('public.s1'::regclass);- newSchema: ""- diff: |+- ALTER SEQUENCE "public"."s1"- OWNED BY NONE;-- DROP TABLE "public"."t1";-- DROP SEQUENCE "public"."s1";--- oldSchema: |- create table public.t1 (a int);- create sequence public.s1- START WITH 1- INCREMENT BY 1- NO MINVALUE- NO MAXVALUE- CACHE 1;- alter sequence public.s1 owned by public.t1.a;- alter table public.t1 alter column a set default nextval('public.s1'::regclass);- newSchema: |- create table public.t1 (a int);- create sequence public.s1- START WITH 1- INCREMENT BY 1- NO MINVALUE- NO MAXVALUE- CACHE 1;- alter sequence public.s1 owned by public.t1.a;- alter table public.t1 alter column a set default nextval('public.s1'::regclass);- diff: ""-- oldSchema: |- create table public.t1 (a int);- create sequence public.s1- START WITH 1- INCREMENT BY 1- NO MINVALUE- NO MAXVALUE- CACHE 1;- newSchema: |- create table public.t1 (a int);- create sequence public.s1- START WITH 1- INCREMENT BY 1- NO MINVALUE- NO MAXVALUE- CACHE 1;- alter sequence public.s1 owned by public.t1.a;- alter table public.t1 alter column a set default nextval('public.s1'::regclass);- diff: |+- ALTER SEQUENCE "public"."s1"- OWNED BY "public"."t1"."a";-- ALTER TABLE "public"."t1"- ALTER COLUMN "a" SET DEFAULT nextval('public.s1'::regclass);-diff --git a/backend/plugin/parser/plsql/test-data/test_concise_schema.yaml b/backend/plugin/parser/plsql/test-data/test_concise_schema.yamldeleted file mode 100644index 8a33a7beca..0000000000--- a/backend/plugin/parser/plsql/test-data/test_concise_schema.yaml+++ /dev/null@@ -1,64 +0,0 @@-- input: |-- -- Create a table for departments- CREATE TABLE BYTEBASE.departments (- department_id NUMBER(3) PRIMARY KEY,- department_name VARCHAR2(50) UNIQUE- );- -- Create a table for employees with a foreign key constraint- CREATE TABLE BYTEBASE.employees (- employee_id NUMBER(5) PRIMARY KEY,- first_name VARCHAR2(50),- last_name VARCHAR2(50),- job_title VARCHAR2(100),- hire_date DATE,- salary NUMBER(10,2),- department_id NUMBER(3),- CONSTRAINT fk_employee_department FOREIGN KEY (department_id) REFERENCES BYTEBASE.departments(department_id)- )- LOGGING- NOCOMPRESS- PCTFREE 10- INITRANS 1- STORAGE (- INITIAL 65536- )- NOCACHE- DISABLE ROW MOVEMENT- ;- -- Create an index on the combination of columns in the employees table- CREATE INDEX idx_employee_name_department ON BYTEBASE.employees(last_name, first_name, department_id);- CREATE INDEX idx_employee_name ON BYTEBASE.employees(last_name, first_name)- LOGGING- VISIBLE- PCTFREE 10- INITRANS 2- STORAGE (- INITIAL 65536- )- USABLE- ;- want: |+- CREATE TABLE departments (- department_id NUMBER(3) PRIMARY KEY,- department_name VARCHAR2(50) UNIQUE- );-- CREATE TABLE employees (- employee_id NUMBER(5) PRIMARY KEY,- first_name VARCHAR2(50),- last_name VARCHAR2(50),- job_title VARCHAR2(100),- hire_date DATE,- salary NUMBER(10,2),- department_id NUMBER(3),- FOREIGN KEY (department_id) REFERENCES departments(department_id)- )- ;-- CREATE INDEX "EMPLOYEES_0230" ON employees(last_name, first_name, department_id);-- CREATE INDEX "EMPLOYEES_0221" ON employees(last_name, first_name)-- USABLE- ;-diff --git a/backend/plugin/parser/plsql/test-data/test_differ_data.yaml b/backend/plugin/parser/plsql/test-data/test_differ_data.yamldeleted file mode 100644index 46bb3cf909..0000000000--- a/backend/plugin/parser/plsql/test-data/test_differ_data.yaml+++ /dev/null@@ -1,83 +0,0 @@-- oldSchema: |-- CREATE TABLE "TEST"."TEST_TABLE" (- "ID" NUMBER(10,0) NOT NULL ENABLE,- "NAME" VARCHAR2(100 BYTE) NOT NULL ENABLE,- "DESCRIPTION" VARCHAR2(100 BYTE) VISIBLE,- "UPDATED" DATE DEFAULT SYSDATE NOT NULL ENABLE,- "DELETED" DATE INVISIBLE,- CONSTRAINT "TEST_TABLE_UK" UNIQUE ("NAME") ENABLE,- CONSTRAINT "TEST_TABLE_UK2" UNIQUE ("DESCRIPTION") ENABLE,- CONSTRAINT "TEST_TABLE_FK" FOREIGN KEY ("ID") REFERENCES "TEST"."TEST_TABLE_B" ("ID") ENABLE- );- CREATE TABLE "TEST"."TEST_TABLE_B" (- "ID" NUMBER(10,0) NOT NULL ENABLE,- "NAME" VARCHAR2(100 BYTE) NOT NULL ENABLE,- "DESCRIPTION" VARCHAR2(100 BYTE),- CONSTRAINT "TEST_TABLE_B_PK" PRIMARY KEY ("ID") ENABLE- );- CREATE INDEX "TEST"."TEST_TABLE_IDX" ON "TEST"."TEST_TABLE" ("ID", "NAME");- CREATE INDEX "TEST"."TEST_TABLE_IDX2" ON "TEST"."TEST_TABLE" ("ID", "NAME");- CREATE INDEX "TEST"."TEST_TABLE_B_IDX" ON "TEST"."TEST_TABLE_B" ("NAME");- newSchema: |-- CREATE TABLE "TEST"."TEST_TABLE" (- "ID" NUMBER(10,0) NOT NULL ENABLE,- "NAME" VARCHAR2(100 BYTE) COLLATE USING_NLS_COMP NOT NULL ENABLE,- "DESCRIPTION" VARCHAR2(200 BYTE) VISIBLE,- "CREATED" DATE DEFAULT SYSDATE NOT NULL ENABLE,- "DELETED" DATE VISIBLE,- CONSTRAINT "TEST_TABLE_PK" PRIMARY KEY ("ID") ENABLE,- CONSTRAINT "TEST_TABLE_UK2" UNIQUE ("DESCRIPTION") ENABLE,- CONSTRAINT "TEST_TABLE_FK" FOREIGN KEY ("ID") REFERENCES "TEST"."TEST_TABLE_C" ("ID") ENABLE- );- CREATE TABLE "TEST"."TEST_TABLE_C" (- "ID" NUMBER(10,0) NOT NULL ENABLE,- "NAME" VARCHAR2(100 BYTE) NOT NULL ENABLE,- "DESCRIPTION" VARCHAR2(100 BYTE) VISIBLE,- CONSTRAINT "TEST_TABLE_C_PK" PRIMARY KEY ("ID") ENABLE- )- LOGGING- NOCOMPRESS- PCTFREE 10- INITRANS 1- STORAGE (- INITIAL 65536- NEXT 1048576- MINEXTENTS 1- MAXEXTENTS UNLIMITED- )- NOCACHE- ;- CREATE INDEX "TEST"."TEST_TABLE_IDX" ON "TEST"."TEST_TABLE" ("ID", "NAME", "DESCRIPTION");- CREATE INDEX "TEST"."TEST_TABLE_IDX3" ON "TEST"."TEST_TABLE" ("ID", "NAME");- CREATE INDEX "TEST"."TEST_TABLE_C_IDX" ON "TEST"."TEST_TABLE_C" ("NAME");- diff: |- ALTER TABLE "TEST"."TEST_TABLE" DROP CONSTRAINT "TEST"."TEST_TABLE_FK";- ALTER TABLE "TEST"."TEST_TABLE" DROP CONSTRAINT "TEST"."TEST_TABLE_UK";- DROP INDEX "TEST"."TEST_TABLE_IDX";- DROP INDEX "TEST"."TEST_TABLE_IDX2";- DROP INDEX "TEST"."TEST_TABLE_B_IDX";- ALTER TABLE "TEST"."TEST_TABLE" DROP (- UPDATED- );- DROP TABLE "TEST"."TEST_TABLE_B";- CREATE TABLE "TEST"."TEST_TABLE_C" (- "ID" NUMBER(10,0) NOT NULL ENABLE,- "NAME" VARCHAR2(100 BYTE) NOT NULL ENABLE,- "DESCRIPTION" VARCHAR2(100 BYTE) VISIBLE,- CONSTRAINT "TEST_TABLE_C_PK" PRIMARY KEY ("ID") ENABLE- );- ALTER TABLE "TEST"."TEST_TABLE" ADD (- "CREATED" DATE DEFAULT SYSDATE NOT NULL ENABLE- );- ALTER TABLE "TEST"."TEST_TABLE" MODIFY (- "NAME" VARCHAR2(100 BYTE) COLLATE USING_NLS_COMP NOT NULL,- "DESCRIPTION" VARCHAR2(200 BYTE)- );- ALTER TABLE "TEST"."TEST_TABLE" MODIFY (- "DELETED" VISIBLE- );- CREATE INDEX "TEST"."TEST_TABLE_IDX" ON "TEST"."TEST_TABLE" ("ID", "NAME", "DESCRIPTION");- CREATE INDEX "TEST"."TEST_TABLE_IDX3" ON "TEST"."TEST_TABLE" ("ID", "NAME");- CREATE INDEX "TEST"."TEST_TABLE_C_IDX" ON "TEST"."TEST_TABLE_C" ("NAME");- ALTER TABLE "TEST"."TEST_TABLE" ADD CONSTRAINT "TEST_TABLE_PK" PRIMARY KEY ("ID") ENABLE;- ALTER TABLE "TEST"."TEST_TABLE" ADD CONSTRAINT "TEST_TABLE_FK" FOREIGN KEY ("ID") REFERENCES "TEST"."TEST_TABLE_C" ("ID") ENABLE;diff --git a/backend/plugin/parser/plsql/test-data/test_differ_non_strict.yaml b/backend/plugin/parser/plsql/test-data/test_differ_non_strict.yamldeleted file mode 100644index 2fb78e0247..0000000000--- a/backend/plugin/parser/plsql/test-data/test_differ_non_strict.yaml+++ /dev/null@@ -1,65 +0,0 @@-- oldSchema: |-- CREATE TABLE "TEST"."TEST_TABLE" (- "ID" NUMBER(10,0) NOT NULL ENABLE,- "NAME" VARCHAR2(100 BYTE) NOT NULL ENABLE,- "DESCRIPTION" VARCHAR2(200 BYTE),- "CREATED" DATE DEFAULT SYSDATE NOT NULL ENABLE,- "DELETED" DATE,- CONSTRAINT "TEST_TABLE_UK2xxx" UNIQUE ("NAME") ENABLE,- CONSTRAINT "TEST_TABLE_PKxxx" PRIMARY KEY ("ID") ENABLE,- CONSTRAINT "TEST_TABLE_FKxxx" FOREIGN KEY ("ID") REFERENCES "TEST"."TEST_TABLE_C" ("ID") ENABLE- );- CREATE INDEX "TEST"."TEST_TABLE_ID" ON "TEST"."TEST_TABLE" ("ID", "NAME");- CREATE INDEX "TEST"."TEST_TABLE_IDX2" ON "TEST"."TEST_TABLE" ("ID", "NAME");- CREATE INDEX "TEST"."TEST_TABLE_B_ID" ON "TEST"."TEST_TABLE_B" ("NAME");- newSchema: |-- CREATE TABLE "AAAA"."TEST_TABLE" (- "ID" NUMBER(10,0) NOT NULL ENABLE,- "NAME" VARCHAR2(100 BYTE) NOT NULL ENABLE,- "DESCRIPTION" VARCHAR2(200 BYTE),- "CREATED" DATE DEFAULT SYSDATE NOT NULL ENABLE,- "DELETED" DATE,- CONSTRAINT "TEST_TABLE_UK2" UNIQUE ("NAME") ENABLE,- CONSTRAINT "TEST_TABLE_PK" PRIMARY KEY ("ID") ENABLE,- CONSTRAINT "TEST_TABLE_FK" FOREIGN KEY ("ID") REFERENCES "AAAA"."TEST_TABLE_C" ("ID") ENABLE- );- CREATE INDEX "AAAA"."TEST_TABLE_IDXxxx" ON "AAAA"."TEST_TABLE" ("ID", "NAME");- CREATE INDEX "AAAA"."TEST_TABLE_IDX2xxx" ON "AAAA"."TEST_TABLE" ("ID", "NAME");- CREATE INDEX "AAAA"."TEST_TABLE_B_IDXxxx" ON "AAAA"."TEST_TABLE_B" ("NAME");- diff: ""-- oldSchema: |-- CREATE TABLE "TEST_TABLE" (- "ID" NUMBER(10,0) NOT NULL ENABLE,- "NAME" VARCHAR2(100 BYTE) NOT NULL ENABLE,- "DESCRIPTION" VARCHAR2(200 BYTE),- "CREATED" DATE DEFAULT SYSDATE NOT NULL ENABLE,- CONSTRAINT "TEST_TABLE_UK2xxx" UNIQUE ("NAME") ENABLE,- CONSTRAINT "TEST_TABLE_PKxxx" PRIMARY KEY ("ID") ENABLE,- CONSTRAINT "TEST_TABLE_FKxxx" FOREIGN KEY ("ID") REFERENCES "TEST_TABLE_C" ("ID") ENABLE- );- CREATE INDEX "TEST_TABLE_ID" ON "TEST_TABLE" ("ID", "NAME");- CREATE INDEX "TEST_TABLE_IDX2" ON "TEST_TABLE" ("ID", "NAME");- newSchema: |-- CREATE TABLE "TEST_TABLE" (- "ID" NUMBER(10,0) NOT NULL ENABLE,- "NAME" VARCHAR2(100 BYTE) NOT NULL ENABLE,- "DESCRIPTION" VARCHAR2(200 BYTE),- "DELETED" DATE,- CONSTRAINT "TEST_TABLE_UK2xxx" UNIQUE ("DELETED") ENABLE,- CONSTRAINT "TEST_TABLE_PKxxx" PRIMARY KEY ("ID") ENABLE,- CONSTRAINT "TEST_TABLE_FKxxx" FOREIGN KEY ("ID") REFERENCES "TEST_TABLE_C" ("ID") ENABLE- );- CREATE INDEX "TEST_TABLE_ID" ON "TEST_TABLE" ("ID", "DELETED");- CREATE INDEX "TEST_TABLE_B_ID" ON "TEST_TABLE_B" ("NAME");- diff: |- ALTER TABLE "TEST_TABLE" DROP CONSTRAINT "TEST_TABLE_UK2xxx";- DROP INDEX "TEST_TABLE_IDX2";- ALTER TABLE "TEST_TABLE" DROP (- CREATED- );- ALTER TABLE "TEST_TABLE" ADD (- "DELETED" DATE- );- CREATE INDEX "TEST_TABLE_ID" ON "TEST_TABLE" ("ID", "DELETED");- CREATE INDEX "TEST_TABLE_B_ID" ON "TEST_TABLE_B" ("NAME");- ALTER TABLE "TEST_TABLE" ADD CONSTRAINT "TEST_TABLE_UK2xxx" UNIQUE ("DELETED") ENABLE;diff --git a/backend/plugin/parser/plsql/test-data/test_strings_manipulate.yaml b/backend/plugin/parser/plsql/test-data/test_strings_manipulate.yamldeleted file mode 100644index ec9c7aa28f..0000000000--- a/backend/plugin/parser/plsql/test-data/test_strings_manipulate.yaml+++ /dev/null@@ -1,345 +0,0 @@-- input: |-- CREATE TABLE "BYTEBASE"."DEPARTMENTS" (- "DEPARTMENT_ID" NUMBER(3) VISIBLE NOT NULL,- "DEPARTMENT_NAME" VARCHAR2(50 BYTE) VISIBLE,- CONSTRAINT "SYS_C006991" PRIMARY KEY ("DEPARTMENT_ID"),- CONSTRAINT "SYS_C006992" UNIQUE ("DEPARTMENT_NAME") NOT DEFERRABLE INITIALLY IMMEDIATE VALIDATE- )- LOGGING- NOCOMPRESS- PCTFREE 10- INITRANS 1- STORAGE (- INITIAL 65536- )- NOCACHE- PARALLEL 1- DISABLE ROW MOVEMENT- ;-- CREATE TABLE "BYTEBASE"."EMPLOYEES" (- "ID" NUMBER VISIBLE,- "NAME" VARCHAR2(255 BYTE) VISIBLE- )- LOGGING- NOCOMPRESS- PCTFREE 10- INITRANS 1- STORAGE (- INITIAL 65536- )- NOCACHE- PARALLEL 1- DISABLE ROW MOVEMENT- ;-- CREATE TABLE "BYTEBASE"."SALARY" (- "EMPLOYEE_ID" NUMBER(5) VISIBLE NOT NULL,- "FIRST_NAME" VARCHAR2(50 BYTE) VISIBLE,- "LAST_NAME" VARCHAR2(50 BYTE) VISIBLE,- "SALARY_AMOUNT" NUMBER(10,2) VISIBLE,- "HIRE_DATE" DATE VISIBLE,- CONSTRAINT "SYS_C006995" PRIMARY KEY ("EMPLOYEE_ID")- )- LOGGING- NOCOMPRESS- PCTFREE 10- INITRANS 1- STORAGE (- INITIAL 65536- )- NOCACHE- PARALLEL 1- DISABLE ROW MOVEMENT- ;-- CREATE TABLE "BYTEBASE"."T" (- "A" NUMBER VISIBLE,- "B" NUMBER VISIBLE- )- LOGGING- NOCOMPRESS- PCTFREE 10- INITRANS 1- STORAGE (- INITIAL 65536- )- NOCACHE- PARALLEL 1- DISABLE ROW MOVEMENT- ;-- CREATE TABLE "BYTEBASE"."TTTTTTTTT" (- "A" NUMBER VISIBLE,- "B" NUMBER VISIBLE- )- LOGGING- NOCOMPRESS- PCTFREE 10- INITRANS 1- STORAGE (- INITIAL 65536- )- NOCACHE- PARALLEL 1- DISABLE ROW MOVEMENT- ;-- CREATE TABLE "BYTEBASE"."employees" (- "ID" NUMBER VISIBLE,- "NAME" VARCHAR2(255 BYTE) VISIBLE- )- LOGGING- NOCOMPRESS- PCTFREE 10- INITRANS 1- STORAGE (- INITIAL 65536- )- NOCACHE- PARALLEL 1- DISABLE ROW MOVEMENT- ;-- CREATE INDEX "IDX_EMPLOYEE_NAME_DEPARTMENT" ON "BYTEBASE"."EMPLOYEES" ("LAST_NAME" ASC, "FIRST_NAME" ASC, "DEPARTMENT_ID" ASC)- LOGGING- VISIBLE- PCTFREE 10- INITRANS 2- STORAGE (- INITIAL 65536- )- USABLE- ;-- CREATE INDEX "IDX_TTTTTTTTT_A" ON "BYTEBASE"."TTTTTTTTT" ("A" ASC)- LOGGING- VISIBLE- PCTFREE 10- INITRANS 2- STORAGE (- INITIAL 65536- )- USABLE- ;- actions:- - type: dropIndex- arguments:- - TTTTTTTTT- - IDX_TTTTTTTTT_A- - type: modifyIndex- arguments:- - EMPLOYEES- - IDX_EMPLOYEE_NAME_DEPARTMENT- - |-- CREATE INDEX "IDX_EMPLOYEE_NAME_DEPARTMENT" ON "BYTEBASE"."EMPLOYEES" ("LAST_NAME" ASC, "FIRST_NAME" ASC)- LOGGING- VISIBLE- PCTFREE 10- INITRANS 2- STORAGE (- INITIAL 65536- )- USABLE- ;- - type: addIndex- arguments:- - T- - |-- CREATE INDEX "IDX_T_A" ON "BYTEBASE"."T" ("A" ASC)- LOGGING- VISIBLE- PCTFREE 10- INITRANS 2- STORAGE (- INITIAL 65536- )- USABLE- ;- - type: addIndex- arguments:- - T2- - |-- CREATE INDEX "IDX_T2_A" ON "BYTEBASE"."T2" ("A" ASC)- LOGGING- VISIBLE- PCTFREE 10- INITRANS 2- STORAGE (- INITIAL 65536- )- USABLE- ;- - type: modifyColumnType- arguments:- - employees- - NAME- - VARCHAR2(244)- - type: addColumn- arguments:- - employees- - '`AGE` NUMBER VISIBLE'- - type: addTable- arguments:- - T2- - |-- CREATE TABLE "BYTEBASE"."T2" (- "A" NUMBER VISIBLE,- "B" NUMBER VISIBLE- )- ;- - type: dropTable- arguments:- - TTTTTTTTT- - type: dropColumn- arguments:- - T- - B- - type: dropTableConstraint- arguments:- - DEPARTMENTS- - SYS_C006991- - type: modifyTableConstraint- arguments:- - DEPARTMENTS- - UNIQUE- - SYS_C006992- - CONSTRAINT "SYS_C006992" UNIQUE ("DEPARTMENT_NAME") DEFERRABLE INITIALLY DEFERRED- - type: addTableConstraint- arguments:- - DEPARTMENTS- - SYS_C006993- - CONSTRAINT "SYS_C006993" UNIQUE ("DEPARTMENT_NAME") DEFERRABLE INITIALLY DEFERRED- want: |-- CREATE TABLE "BYTEBASE"."DEPARTMENTS" (- "DEPARTMENT_ID" NUMBER(3) VISIBLE NOT NULL,- "DEPARTMENT_NAME" VARCHAR2(50 BYTE) VISIBLE,- CONSTRAINT "SYS_C006992" UNIQUE ("DEPARTMENT_NAME") DEFERRABLE INITIALLY DEFERRED,- CONSTRAINT "SYS_C006993" UNIQUE ("DEPARTMENT_NAME") DEFERRABLE INITIALLY DEFERRED- )- LOGGING- NOCOMPRESS- PCTFREE 10- INITRANS 1- STORAGE (- INITIAL 65536- )- NOCACHE- PARALLEL 1- DISABLE ROW MOVEMENT- ;-- CREATE TABLE "BYTEBASE"."EMPLOYEES" (- "ID" NUMBER VISIBLE,- "NAME" VARCHAR2(255 BYTE) VISIBLE- )- LOGGING- NOCOMPRESS- PCTFREE 10- INITRANS 1- STORAGE (- INITIAL 65536- )- NOCACHE- PARALLEL 1- DISABLE ROW MOVEMENT- ;-- CREATE TABLE "BYTEBASE"."SALARY" (- "EMPLOYEE_ID" NUMBER(5) VISIBLE NOT NULL,- "FIRST_NAME" VARCHAR2(50 BYTE) VISIBLE,- "LAST_NAME" VARCHAR2(50 BYTE) VISIBLE,- "SALARY_AMOUNT" NUMBER(10,2) VISIBLE,- "HIRE_DATE" DATE VISIBLE,- CONSTRAINT "SYS_C006995" PRIMARY KEY ("EMPLOYEE_ID")- )- LOGGING- NOCOMPRESS- PCTFREE 10- INITRANS 1- STORAGE (- INITIAL 65536- )- NOCACHE- PARALLEL 1- DISABLE ROW MOVEMENT- ;-- CREATE TABLE "BYTEBASE"."T" (- "A" NUMBER VISIBLE- )- LOGGING- NOCOMPRESS- PCTFREE 10- INITRANS 1- STORAGE (- INITIAL 65536- )- NOCACHE- PARALLEL 1- DISABLE ROW MOVEMENT- ;-- CREATE INDEX "IDX_T_A" ON "BYTEBASE"."T" ("A" ASC)- LOGGING- VISIBLE- PCTFREE 10- INITRANS 2- STORAGE (- INITIAL 65536- )- USABLE- ;-- CREATE TABLE "BYTEBASE"."employees" (- "ID" NUMBER VISIBLE,- "NAME" VARCHAR2(244) VISIBLE,- `AGE` NUMBER VISIBLE- )- LOGGING- NOCOMPRESS- PCTFREE 10- INITRANS 1- STORAGE (- INITIAL 65536- )- NOCACHE- PARALLEL 1- DISABLE ROW MOVEMENT- ;-- CREATE INDEX "IDX_EMPLOYEE_NAME_DEPARTMENT" ON "BYTEBASE"."EMPLOYEES" ("LAST_NAME" ASC, "FIRST_NAME" ASC, "DEPARTMENT_ID" ASC)- LOGGING- VISIBLE- PCTFREE 10- INITRANS 2- STORAGE (- INITIAL 65536- )- USABLE- ;- CREATE INDEX "IDX_TTTTTTTTT_A" ON "BYTEBASE"."TTTTTTTTT" ("A" ASC)- LOGGING- VISIBLE- PCTFREE 10- INITRANS 2- STORAGE (- INITIAL 65536- )- USABLE- ;- CREATE TABLE "BYTEBASE"."T2" (- "A" NUMBER VISIBLE,- "B" NUMBER VISIBLE- )- ;- CREATE INDEX "IDX_T2_A" ON "BYTEBASE"."T2" ("A" ASC)- LOGGING- VISIBLE- PCTFREE 10- INITRANS 2- STORAGE (- INITIAL 65536- )- USABLE- ;diff --git a/backend/plugin/parser/tidb/test-data/differ/test_differ_partition.yaml b/backend/plugin/parser/tidb/test-data/differ/test_differ_partition.yamldeleted file mode 100644index a921293bc3..0000000000--- a/backend/plugin/parser/tidb/test-data/differ/test_differ_partition.yaml+++ /dev/null@@ -1,17 +0,0 @@-- oldSchema: |- CREATE TABLE range_partition(- id INT- ) PARTITION BY RANGE (id) (- PARTITION p0 VALUES LESS THAN (10)- );- newSchema: |- CREATE TABLE range_partition(- id INT- ) PARTITION BY RANGE (id) (- PARTITION p0 VALUES LESS THAN (10),- PARTITION p1 VALUES LESS THAN (20)- );- diff: |- ALTER TABLE `range_partition` PARTITION BY RANGE (`id`)- (PARTITION p0 VALUES LESS THAN (10) ENGINE=InnoDB,- PARTITION p1 VALUES LESS THAN (20) ENGINE=InnoDB);diff --git a/backend/plugin/parser/tidb/test-data/test_strings_manipulate.yaml b/backend/plugin/parser/tidb/test-data/test_strings_manipulate.yamldeleted file mode 100644index 5c2b86dedd..0000000000--- a/backend/plugin/parser/tidb/test-data/test_strings_manipulate.yaml+++ /dev/null@@ -1,188 +0,0 @@-- input: |-- -- Table structure for `t`- CREATE TABLE `t` (- `id` int /*T![auto_rand] AUTO_RANDOM(6, 54) */,- `name` varchar(10) NOT NULL,- PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */,- KEY `idx_name` (`name`(5)),- UNIQUE KEY `name` (`name`)- );- actions:- - type: modifyColumnType- arguments:- - t- - id- - varchar(10)- - type: addColumnOption- arguments:- - t- - name- - comment- - COMMENT 'this is comment'- want: |- -- Table structure for `t`- CREATE TABLE `t` (- `id` varchar(10) /*T![auto_rand] AUTO_RANDOM(6, 54) */,- `name` varchar(10) NOT NULL COMMENT 'this is comment',- PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */,- KEY `idx_name` (`name`(5)),- UNIQUE KEY `name` (`name`)- );-- input: |-- -- Table structure for `t`- CREATE TABLE `t` (- `id` int /* this is comment */,- `name` varchar(10) NOT NULL,- PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */- );- -- Table structure for `t1`- CREATE TABLE `t1` (- `id` int- ) COMMENT 'this is comment';- actions:- - type: addColumn- arguments:- - t- - '`age` int NOT NULL'- want: |- -- Table structure for `t`- CREATE TABLE `t` (- `id` int /* this is comment */,- `name` varchar(10) NOT NULL,- `age` int NOT NULL,- PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */- );- -- Table structure for `t1`- CREATE TABLE `t1` (- `id` int- ) COMMENT 'this is comment';-- input: |-- -- Table structure for `t`- CREATE TABLE `t` (- `id` int,- `name` varchar(10) NOT NULL,- `age` int,- PRIMARY KEY (`id`),- UNIQUE KEY `name` (`name`)- );- -- Table structure for `t1`- CREATE TABLE `t1` (- `id` int- ) COMMENT 'this is comment';- SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;- SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;- actions:- - type: addTable- arguments:- - |-- -- Table structure for `t2`- CREATE TABLE `t2` (- `id` int- );- - type: addTableOption- arguments:- - t- - COMMENT 'this is comment'- - type: modifyTableOption- arguments:- - t1- - comment- - COMMENT 'this is comment 2'- - type: dropColumn- arguments:- - t- - age- - type: dropColumnOption- arguments:- - t- - name- - notNull- - type: addColumnOption- arguments:- - t- - id- - notNull- - NOT NULL- - type: dropTableConstraint- arguments:- - t- - PRIMARY KEY- - type: modifyTableConstraint- arguments:- - t- - uniqueKey- - name- - UNIQUE KEY `name` (`id`, `name`)- - type: addTableConstraint- arguments:- - t- - uniqueKey- - UNIQUE KEY `id` (`id`)- - type: addColumn- arguments:- - t1- - age int NOT NULL- want: |- -- Table structure for `t`- CREATE TABLE `t` (- `id` int NOT NULL,- `name` varchar(10),- PRIMARY KEY (`id`),- UNIQUE KEY `name` (`id`, `name`),- UNIQUE KEY `id` (`id`)- ) COMMENT 'this is comment' ;- -- Table structure for `t1`- CREATE TABLE `t1` (- `id` int,- age int NOT NULL- ) COMMENT 'this is comment 2';- -- Table structure for `t2`- CREATE TABLE `t2` (- `id` int- );- SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;- SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;-- input: |-- -- Table structure for `t`- CREATE TABLE `t` (- `id` int- );- -- Table structure for `t1`- CREATE TABLE `t1` (- `id` int- );- actions:- - type: dropTable- arguments:- - t- - type: addColumnOption- arguments:- - t1- - id- - notNull- - NOT NULL- want: |- -- Table structure for `t1`- CREATE TABLE `t1` (- `id` int NOT NULL- );-- input: |-- -- Table structure for `t`- CREATE TABLE `t` (- `id` int- ) COMMENT 'this is comment';- actions:- - type: modifyColumnType- arguments:- - t- - id- - varchar(10)- - type: dropTableOption- arguments:- - t- - comment- want: |- -- Table structure for `t`- CREATE TABLE `t` (- `id` varchar(10)- ) ;diff --git a/backend/plugin/parser/trino/test-data/query-span/data-access-control.yaml b/backend/plugin/parser/trino/test-data/query-span/data-access-control.yamldeleted file mode 100644index 1c1abaf753..0000000000--- a/backend/plugin/parser/trino/test-data/query-span/data-access-control.yaml+++ /dev/null@@ -1,123 +0,0 @@-- description: Simple WHERE clause predicate extraction- statement: SELECT id, name FROM users WHERE status = 'active' AND company_id = 5;- defaultDatabase: catalog1- metadata: '{"name":"catalog1","schemas":[{"name":"public","tables":[{"name":"users","columns":[{"name":"id","type":"integer"},{"name":"name","type":"varchar"},{"name":"status","type":"varchar"},{"name":"company_id","type":"integer"}]}]}]}'- querySpan:- type:- querytype: 1- results: []- sourceColumns:- "catalog1.public.users.id": true- "catalog1.public.users.name": true- "catalog1.public.users.status": true- "catalog1.public.users.company_id": true- predicateColumns:- "catalog1.public.users.status": true- "catalog1.public.users.company_id": true--- description: JOIN predicate extraction- statement: SELECT u.id, u.name, o.order_id FROM users u JOIN orders o ON u.id = o.user_id AND o.status = 'shipped';- defaultDatabase: catalog1- metadata: '{"name":"catalog1","schemas":[{"name":"public","tables":[{"name":"users","columns":[{"name":"id","type":"integer"},{"name":"name","type":"varchar"}]},{"name":"orders","columns":[{"name":"order_id","type":"integer"},{"name":"user_id","type":"integer"},{"name":"status","type":"varchar"}]}]}]}'- querySpan:- type:- querytype: 1- results: []- sourceColumns:- "catalog1.public.users.id": true- "catalog1.public.users.name": true- "catalog1.public.orders.order_id": true- "catalog1.public.orders.user_id": true- "catalog1.public.orders.status": true- predicateColumns:- "catalog1.public.users.id": true- "catalog1.public.orders.user_id": true- "catalog1.public.orders.status": true--- description: Complex predicate with functions- statement: SELECT id, name FROM users WHERE LOWER(status) = 'active' AND company_id BETWEEN 5 AND 10;- defaultDatabase: catalog1- metadata: '{"name":"catalog1","schemas":[{"name":"public","tables":[{"name":"users","columns":[{"name":"id","type":"integer"},{"name":"name","type":"varchar"},{"name":"status","type":"varchar"},{"name":"company_id","type":"integer"}]}]}]}'- querySpan:- type:- querytype: 1- results: []- sourceColumns:- "catalog1.public.users.id": true- "catalog1.public.users.name": true- "catalog1.public.users.status": true- "catalog1.public.users.company_id": true- predicateColumns:- "catalog1.public.users.status": true- "catalog1.public.users.company_id": true--- description: UNION query predicate extraction- statement: SELECT id, name FROM users WHERE status = 'active' UNION SELECT id, name FROM employees WHERE department = 'Sales';- defaultDatabase: catalog1- metadata: '{"name":"catalog1","schemas":[{"name":"public","tables":[{"name":"users","columns":[{"name":"id","type":"integer"},{"name":"name","type":"varchar"},{"name":"status","type":"varchar"}]},{"name":"employees","columns":[{"name":"id","type":"integer"},{"name":"name","type":"varchar"},{"name":"department","type":"varchar"}]}]}]}'- querySpan:- type:- querytype: 1- results: []- sourceColumns:- "catalog1.public.users.id": true- "catalog1.public.users.name": true- "catalog1.public.users.status": true- "catalog1.public.employees.id": true- "catalog1.public.employees.name": true- "catalog1.public.employees.department": true- predicateColumns:- "catalog1.public.users.status": true- "catalog1.public.employees.department": true--- description: Subquery predicate extraction- statement: SELECT id, name FROM users WHERE company_id IN (SELECT id FROM companies WHERE region = 'EU');- defaultDatabase: catalog1- metadata: '{"name":"catalog1","schemas":[{"name":"public","tables":[{"name":"users","columns":[{"name":"id","type":"integer"},{"name":"name","type":"varchar"},{"name":"company_id","type":"integer"}]},{"name":"companies","columns":[{"name":"id","type":"integer"},{"name":"region","type":"varchar"}]}]}]}'- querySpan:- type:- querytype: 1- results: []- sourceColumns:- "catalog1.public.users.id": true- "catalog1.public.users.name": true- "catalog1.public.users.company_id": true- "catalog1.public.companies.id": true- "catalog1.public.companies.region": true- predicateColumns:- "catalog1.public.users.company_id": true- "catalog1.public.companies.id": true- "catalog1.public.companies.region": true--- description: WITH clause predicate extraction- statement: WITH active_users AS (SELECT id, name FROM users WHERE status = 'active') SELECT id, name FROM active_users WHERE id > 1000;- defaultDatabase: catalog1- metadata: '{"name":"catalog1","schemas":[{"name":"public","tables":[{"name":"users","columns":[{"name":"id","type":"integer"},{"name":"name","type":"varchar"},{"name":"status","type":"varchar"}]}]}]}'- querySpan:- type:- querytype: 1- results: []- sourceColumns:- "catalog1.public.users.id": true- "catalog1.public.users.name": true- "catalog1.public.users.status": true- predicateColumns:- "catalog1.public.users.status": true- "catalog1.public.users.id": true--- description: Qualified column references in predicates- statement: SELECT u.id, u.name FROM users u WHERE u.status = 'active' AND u.company_id = 5;- defaultDatabase: catalog1- metadata: '{"name":"catalog1","schemas":[{"name":"public","tables":[{"name":"users","columns":[{"name":"id","type":"integer"},{"name":"name","type":"varchar"},{"name":"status","type":"varchar"},{"name":"company_id","type":"integer"}]}]}]}'- querySpan:- type:- querytype: 1- results: []- sourceColumns:- "catalog1.public.users.id": true- "catalog1.public.users.name": true- "catalog1.public.users.status": true- "catalog1.public.users.company_id": true- predicateColumns:- "catalog1.public.users.status": true- "catalog1.public.users.company_id": true\ No newline at end of filediff --git a/backend/plugin/parser/trino/test-data/query-span/predicate-columns.yaml b/backend/plugin/parser/trino/test-data/query-span/predicate-columns.yamldeleted file mode 100644index 35427e1c05..0000000000--- a/backend/plugin/parser/trino/test-data/query-span/predicate-columns.yaml+++ /dev/null@@ -1,135 +0,0 @@-# Test cases for predicate column extraction in Trino parser-# These tests focus on the ability to identify columns used in predicate contexts-# like WHERE clauses, JOIN conditions, and HAVING clauses.--- description: Basic WHERE clause predicate extraction- statement: |- SELECT id, name- FROM users- WHERE active = true AND age > 18- defaultDatabase: catalog1- metadata: '{"name":"catalog1","schemas":[{"name":"public","tables":[{"name":"users","columns":[{"name":"id","type":"integer"},{"name":"name","type":"varchar"},{"name":"active","type":"boolean"},{"name":"age","type":"integer"}]}]}]}'- querySpan:- type:- querytype: 1- sourceColumns:- "catalog1.public.users.id": true- "catalog1.public.users.name": true- "catalog1.public.users.active": true- "catalog1.public.users.age": true- predicateColumns:- "catalog1.public.users.active": true- "catalog1.public.users.age": true--- description: JOIN with predicate columns- statement: |- SELECT u.id, u.name, o.order_id- FROM users u- JOIN orders o ON u.id = o.user_id- WHERE u.active = true- defaultDatabase: catalog1- metadata: '{"name":"catalog1","schemas":[{"name":"public","tables":[{"name":"users","columns":[{"name":"id","type":"integer"},{"name":"name","type":"varchar"},{"name":"active","type":"boolean"}]},{"name":"orders","columns":[{"name":"order_id","type":"integer"},{"name":"user_id","type":"integer"}]}]}]}'- querySpan:- type:- querytype: 1- sourceColumns:- "catalog1.public.users.id": true- "catalog1.public.users.name": true- "catalog1.public.users.active": true- "catalog1.public.orders.order_id": true- "catalog1.public.orders.user_id": true- predicateColumns:- "catalog1.public.users.id": true- "catalog1.public.orders.user_id": true- "catalog1.public.users.active": true--- description: HAVING clause predicate extraction- statement: |- SELECT department, COUNT(*) as count- FROM employees- GROUP BY department- HAVING COUNT(*) > 10- defaultDatabase: catalog1- metadata: '{"name":"catalog1","schemas":[{"name":"public","tables":[{"name":"employees","columns":[{"name":"id","type":"integer"},{"name":"name","type":"varchar"},{"name":"department","type":"varchar"}]}]}]}'- querySpan:- type:- querytype: 1- sourceColumns:- "catalog1.public.employees.department": true- predicateColumns: {}--- description: IN clause predicate extraction- statement: |- SELECT id, name- FROM users- WHERE department IN ('Sales', 'Marketing', 'Engineering')- defaultDatabase: catalog1- metadata: '{"name":"catalog1","schemas":[{"name":"public","tables":[{"name":"users","columns":[{"name":"id","type":"integer"},{"name":"name","type":"varchar"},{"name":"department","type":"varchar"}]}]}]}'- querySpan:- type:- querytype: 1- sourceColumns:- "catalog1.public.users.id": true- "catalog1.public.users.name": true- "catalog1.public.users.department": true- predicateColumns:- "catalog1.public.users.department": true--- description: Subquery predicates- statement: |- SELECT id, name- FROM users- WHERE department_id IN (- SELECT id FROM departments WHERE active = true- )- defaultDatabase: catalog1- metadata: '{"name":"catalog1","schemas":[{"name":"public","tables":[{"name":"users","columns":[{"name":"id","type":"integer"},{"name":"name","type":"varchar"},{"name":"department_id","type":"integer"}]},{"name":"departments","columns":[{"name":"id","type":"integer"},{"name":"active","type":"boolean"}]}]}]}'- querySpan:- type:- querytype: 1- sourceColumns:- "catalog1.public.users.id": true- "catalog1.public.users.name": true- "catalog1.public.users.department_id": true- "catalog1.public.departments.id": true- "catalog1.public.departments.active": true- predicateColumns:- "catalog1.public.users.department_id": true- "catalog1.public.departments.id": true- "catalog1.public.departments.active": true--- description: BETWEEN clause predicate extraction- statement: |- SELECT id, name- FROM orders- WHERE order_date BETWEEN '2023-01-01' AND '2023-12-31'- defaultDatabase: catalog1- metadata: '{"name":"catalog1","schemas":[{"name":"public","tables":[{"name":"orders","columns":[{"name":"id","type":"integer"},{"name":"name","type":"varchar"},{"name":"order_date","type":"date"}]}]}]}'- querySpan:- type:- querytype: 1- sourceColumns:- "catalog1.public.orders.id": true- "catalog1.public.orders.name": true- "catalog1.public.orders.order_date": true- predicateColumns:- "catalog1.public.orders.order_date": true--- description: Complex expression with function calls- statement: |- SELECT id, name- FROM users- WHERE LOWER(email) LIKE '%example.com' AND DATE_TRUNC('month', registered_at) > '2023-01-01'- defaultDatabase: catalog1- metadata: '{"name":"catalog1","schemas":[{"name":"public","tables":[{"name":"users","columns":[{"name":"id","type":"integer"},{"name":"name","type":"varchar"},{"name":"email","type":"varchar"},{"name":"registered_at","type":"timestamp"}]}]}]}'- querySpan:- type:- querytype: 1- sourceColumns:- "catalog1.public.users.id": true- "catalog1.public.users.name": true- "catalog1.public.users.email": true- "catalog1.public.users.registered_at": true- predicateColumns:- "catalog1.public.users.email": true- "catalog1.public.users.registered_at": true\ No newline at end of filediff --git a/backend/plugin/parser/tsql/test-data/test_differ_data.yaml b/backend/plugin/parser/tsql/test-data/test_differ_data.yamldeleted file mode 100644index ecfad9beff..0000000000--- a/backend/plugin/parser/tsql/test-data/test_differ_data.yaml+++ /dev/null@@ -1,109 +0,0 @@-- oldSchema: |-- CREATE TABLE [dbo].[Books] (- [BookID] int IDENTITY(1,1) NOT NULL,- [AuthorID] decimal(10, 2) NOT NULL,- [Price] decimal(10, 2) NOT NULL,- [PublicationDate] date NULL,- CONSTRAINT [PK__Books__3DE0C22787641226] PRIMARY KEY CLUSTERED ([BookID] ASC),- );-- CREATE NONCLUSTERED INDEX [idx_Books_AuthorID2] ON- [dbo].[Books] (- [AuthorID] ASC- );-- CREATE NONCLUSTERED INDEX [idx_Books_AuthorID] ON- [dbo].[Books] (- [AuthorID] DESC- );-- CREATE TABLE [dbo].[Students] (- [StudentID] int NOT NULL,- [FirstName] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,- [LastName] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,- [Age] int NULL,- [Gender] nvarchar(20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,- CONSTRAINT [PK__Students__32C52A79D61D6642] PRIMARY KEY CLUSTERED ([StudentID] ASC),- CONSTRAINT [CHK_StudentAge] CHECK ([Age]>=(18) AND [Age]<=(30)),- CONSTRAINT [CHK_StudentAge1] CHECK ([Age]>=(18) AND [Age]<=(30))- );- newSchema: |-- CREATE TABLE [dbo].[Books] (- [BookID] int IDENTITY(1,1) NOT NULL,- [Title] nvarchar(510) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,- [AuthorID] int NOT NULL,- [PublicationDate] date NULL,- CONSTRAINT [PK__Books__3DE0C22787641226] PRIMARY KEY CLUSTERED ([BookID] ASC),- CONSTRAINT [FK__Books__AuthorID__276EDEB3] FOREIGN KEY ([AuthorID]) REFERENCES [dbo].[Authors] ([AuthorID]) ON DELETE NO ACTION ON UPDATE NO ACTION- );-- CREATE NONCLUSTERED INDEX [idx_Books_AuthorID] ON- [dbo].[Books] (- [AuthorID] ASC- );-- CREATE NONCLUSTERED INDEX [idx_Books_AuthorID3] ON- [dbo].[Books] (- [AuthorID] ASC- );-- CREATE TABLE [dbo].[CourseOfferings] (- [OfferingID] int IDENTITY(1,1) NOT NULL,- [CourseID] int NULL,- [DepartmentID] int NULL,- [Semester] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,- [Year] int NULL,- CONSTRAINT [PK__CourseOf__3500D7CD56B5AD60] PRIMARY KEY CLUSTERED ([OfferingID] ASC),- CONSTRAINT [FK__CourseOfferings__412EB0B6] FOREIGN KEY ([CourseID], [DepartmentID]) REFERENCES [dbo].[Courses] ([CourseID], [DepartmentID]) ON DELETE NO ACTION ON UPDATE NO ACTION- );-- CREATE TABLE [dbo].[Students] (- [StudentID] int NOT NULL,- [FirstName] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,- [LastName] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,- [Age] int NULL,- [Gender] nvarchar(20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,- CONSTRAINT [PK__Students__32C52A79D61D6642] PRIMARY KEY CLUSTERED ([StudentID] ASC),- CONSTRAINT [CHK_StudentAge] CHECK ([Age]>=(18) AND [Age]<=(30)),- CONSTRAINT [CHK_StudentAge1] CHECK ([Age]>=(20) AND [Age]<=(30))- );- diff: |+- ALTER TABLE [dbo].[Students] DROP CONSTRAINT [chk_studentage1];-- DROP INDEX [idx_Books_AuthorID] ON [dbo].[Books];-- DROP INDEX [idx_Books_AuthorID2] ON [dbo].[Books];-- ALTER TABLE [dbo].[Books] DROP COLUMN [Price];-- CREATE TABLE [dbo].[CourseOfferings] (- [OfferingID] int IDENTITY(1,1) NOT NULL,- [CourseID] int NULL,- [DepartmentID] int NULL,- [Semester] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,- [Year] int NULL,- CONSTRAINT [PK__CourseOf__3500D7CD56B5AD60] PRIMARY KEY CLUSTERED ([OfferingID] ASC),- CONSTRAINT [FK__CourseOfferings__412EB0B6] FOREIGN KEY ([CourseID], [DepartmentID]) REFERENCES [dbo].[Courses] ([CourseID], [DepartmentID]) ON DELETE NO ACTION ON UPDATE NO ACTION- );-- ALTER TABLE [dbo].[Books] ADD- [Title] nvarchar(510) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL;-- ALTER TABLE [dbo].[Books] ALTER COLUMN [AuthorID] int NOT NULL;-- CREATE NONCLUSTERED INDEX [idx_Books_AuthorID] ON- [dbo].[Books] (- [AuthorID] ASC- );-- CREATE NONCLUSTERED INDEX [idx_Books_AuthorID3] ON- [dbo].[Books] (- [AuthorID] ASC- );-- ALTER TABLE [dbo].[Books] ADD- CONSTRAINT [FK__Books__AuthorID__276EDEB3] FOREIGN KEY ([AuthorID]) REFERENCES [dbo].[Authors] ([AuthorID]) ON DELETE NO ACTION ON UPDATE NO ACTION;-- ALTER TABLE [dbo].[Students] ADD- CONSTRAINT [CHK_StudentAge1] CHECK ([Age]>=(20) AND [Age]<=(30));-diff --git a/backend/plugin/schema/mysql/testdata/get-design-schema/function/create-new-function.yaml b/backend/plugin/schema/mysql/testdata/get-design-schema/function/create-new-function.yamldeleted file mode 100644index c8e546e62a..0000000000--- a/backend/plugin/schema/mysql/testdata/get-design-schema/function/create-new-function.yaml+++ /dev/null@@ -1,164 +0,0 @@-- description: Create new function should before the procedure- target: |-- {- "name": "test_function",- "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,- "position": 1,- "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"- }- ],- "procedures": [- {- "name": "citycount",- "definition": "CREATE DEFINER=`root`@`%` PROCEDURE `citycount`(IN country CHAR(3), OUT cities INT)\nBEGIN\n SELECT 1000 INTO cities;\n END"- }- ]- }- ],- "collation": "utf8mb4_0900_ai_ci",- "characterSet": "utf8mb4"- }- result: |- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `id` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci;-- --- -- View structure for `v1`- --- CREATE OR REPLACE VIEW `v1` AS select `t`.`id` AS `id` from `t`;-- --- -- Function structure for `CalcIncome`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome`( starting_value INT ) RETURNS int(11)- DETERMINISTIC- BEGIN-- DECLARE income INT;-- SET income = 0;-- label1: WHILE income <= 3000 DO- SET income = income + starting_value;- END WHILE label1;-- RETURN income;-- END ;;- DELIMITER ;-- --- -- Procedure structure for `citycount`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` PROCEDURE `citycount`(IN country CHAR(3), OUT cities INT)- BEGIN- SELECT 1000 INTO cities;- END ;;- DELIMITER ;-- description: Create new function in schema without function- target: |-- {- "name": "test_function",- "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,- "position": 1,- "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"- }- ]- }- ],- "collation": "utf8mb4_0900_ai_ci",- "characterSet": "utf8mb4"- }- result: |- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `id` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci;-- --- -- View structure for `v1`- --- CREATE OR REPLACE VIEW `v1` AS select `t`.`id` AS `id` from `t`;-- --- -- Function structure for `CalcIncome`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome`( starting_value INT ) RETURNS int(11)- DETERMINISTIC- BEGIN-- DECLARE income INT;-- SET income = 0;-- label1: WHILE income <= 3000 DO- SET income = income + starting_value;- END WHILE label1;-- RETURN income;-- END ;;- DELIMITER ;diff --git a/backend/plugin/schema/mysql/testdata/get-design-schema/function/delete-function-without-set.yaml b/backend/plugin/schema/mysql/testdata/get-design-schema/function/delete-function-without-set.yamldeleted file mode 100644index 71b00b2f83..0000000000--- a/backend/plugin/schema/mysql/testdata/get-design-schema/function/delete-function-without-set.yaml+++ /dev/null@@ -1,345 +0,0 @@-- description: Delete the the first function in schema- target: |-- {- "name": "test_function",- "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,- "position": 1,- "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"- }- ],- "procedures": [- {- "name": "citycount",- "definition": "CREATE DEFINER=`root`@`%` PROCEDURE `citycount`(IN country CHAR(3), OUT cities INT)\nBEGIN\n SELECT 1000 INTO cities;\n END"- }- ]- }- ],- "collation": "utf8mb4_0900_ai_ci",- "characterSet": "utf8mb4"- }- result: |- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `id` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci;-- --- -- View structure for `v1`- --- CREATE OR REPLACE VIEW `v1` AS select `t`.`id` AS `id` from `t`;-- --- -- Function structure for `CalcIncome2`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome2`( starting_value INT ) RETURNS int(11)- DETERMINISTIC- BEGIN-- DECLARE income INT;-- SET income = 0;-- label1: WHILE income <= 3000 DO- SET income = income + starting_value;- END WHILE label1;-- RETURN income;-- END ;;- DELIMITER ;-- --- -- Function structure for `CalcIncome3`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome3`( starting_value INT ) RETURNS int(11)- DETERMINISTIC- BEGIN-- DECLARE income INT;-- SET income = 0;-- label1: WHILE income <= 3000 DO- SET income = income + starting_value;- END WHILE label1;-- RETURN income;-- END ;;- DELIMITER ;-- --- -- Procedure structure for `citycount`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` PROCEDURE `citycount`(IN country CHAR(3), OUT cities INT)- BEGIN- SELECT 1000 INTO cities;- END ;;- DELIMITER ;-- description: Delete the the middle function in schema- target: |-- {- "name": "test_function",- "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,- "position": 1,- "defaultNull": true- }- ],- "dataSize": "16384",- "collation": "utf8mb4_0900_ai_ci"- }- ],- "functions": [- {- "name": "CalcIncome4",- "definition": "CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome4`( 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"- }- ],- "procedures": [- {- "name": "citycount",- "definition": "CREATE DEFINER=`root`@`%` PROCEDURE `citycount`(IN country CHAR(3), OUT cities INT)\nBEGIN\n SELECT 1000 INTO cities;\n END"- }- ]- }- ],- "collation": "utf8mb4_0900_ai_ci",- "characterSet": "utf8mb4"- }- result: |- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `id` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci;-- --- -- View structure for `v1`- --- CREATE OR REPLACE VIEW `v1` AS select `t`.`id` AS `id` from `t`;-- --- -- Function structure for `CalcIncome4`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome4`( starting_value INT ) RETURNS int(11)- DETERMINISTIC- BEGIN-- DECLARE income INT;-- SET income = 0;-- label1: WHILE income <= 3000 DO- SET income = income + starting_value;- END WHILE label1;-- RETURN income;-- END ;;- DELIMITER ;-- --- -- Function structure for `CalcIncome3`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome3`( starting_value INT ) RETURNS int(11)- DETERMINISTIC- BEGIN-- DECLARE income INT;-- SET income = 0;-- label1: WHILE income <= 3000 DO- SET income = income + starting_value;- END WHILE label1;-- RETURN income;-- END ;;- DELIMITER ;-- --- -- Procedure structure for `citycount`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` PROCEDURE `citycount`(IN country CHAR(3), OUT cities INT)- BEGIN- SELECT 1000 INTO cities;- END ;;- DELIMITER ;-- description: Delete the the last function in schema- target: |-- {- "name": "test_function",- "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,- "position": 1,- "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"- }- ]- }- ],- "collation": "utf8mb4_0900_ai_ci",- "characterSet": "utf8mb4"- }- result: |- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `id` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci;-- --- -- View structure for `v1`- --- CREATE OR REPLACE VIEW `v1` AS select `t`.`id` AS `id` from `t`;-- --- -- Function structure for `CalcIncome`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome`( starting_value INT ) RETURNS int(11)- DETERMINISTIC- BEGIN-- DECLARE income INT;-- SET income = 0;-- label1: WHILE income <= 3000 DO- SET income = income + starting_value;- END WHILE label1;-- RETURN income;-- END ;;- DELIMITER ;-- --- -- Function structure for `CalcIncome2`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome2`( starting_value INT ) RETURNS int(11)- DETERMINISTIC- BEGIN-- DECLARE income INT;-- SET income = 0;-- label1: WHILE income <= 3000 DO- SET income = income + starting_value;- END WHILE label1;-- RETURN income;-- END ;;- DELIMITER ;-- --- -- Procedure structure for `citycount`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` PROCEDURE `citycount`(IN country CHAR(3), OUT cities INT)- BEGIN- SELECT 1000 INTO cities;- END ;;- DELIMITER ;diff --git a/backend/plugin/schema/mysql/testdata/get-design-schema/function/delete-function.yaml b/backend/plugin/schema/mysql/testdata/get-design-schema/function/delete-function.yamldeleted file mode 100644index 799c81b60e..0000000000--- a/backend/plugin/schema/mysql/testdata/get-design-schema/function/delete-function.yaml+++ /dev/null@@ -1,345 +0,0 @@-- description: Delete the the first function in schema- target: |-- {- "name": "test_function",- "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,- "position": 1,- "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"- }- ],- "procedures": [- {- "name": "citycount",- "definition": "CREATE DEFINER=`root`@`%` PROCEDURE `citycount`(IN country CHAR(3), OUT cities INT)\nBEGIN\n SELECT 1000 INTO cities;\n END"- }- ]- }- ],- "collation": "utf8mb4_0900_ai_ci",- "characterSet": "utf8mb4"- }- result: |- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `id` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci;-- --- -- View structure for `v1`- --- CREATE OR REPLACE VIEW `v1` AS select `t`.`id` AS `id` from `t`;-- --- -- Function structure for `CalcIncome2`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome2`( starting_value INT ) RETURNS int(11)- DETERMINISTIC- BEGIN-- DECLARE income INT;-- SET income = 0;-- label1: WHILE income <= 3000 DO- SET income = income + starting_value;- END WHILE label1;-- RETURN income;-- END ;;- DELIMITER ;-- --- -- Function structure for `CalcIncome3`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome3`( starting_value INT ) RETURNS int(11)- DETERMINISTIC- BEGIN-- DECLARE income INT;-- SET income = 0;-- label1: WHILE income <= 3000 DO- SET income = income + starting_value;- END WHILE label1;-- RETURN income;-- END ;;- DELIMITER ;-- --- -- Procedure structure for `citycount`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` PROCEDURE `citycount`(IN country CHAR(3), OUT cities INT)- BEGIN- SELECT 1000 INTO cities;- END ;;- DELIMITER ;-- description: Delete the the middle function in schema- target: |-- {- "name": "test_function",- "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,- "position": 1,- "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": "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"- }- ],- "procedures": [- {- "name": "citycount",- "definition": "CREATE DEFINER=`root`@`%` PROCEDURE `citycount`(IN country CHAR(3), OUT cities INT)\nBEGIN\n SELECT 1000 INTO cities;\n END"- }- ]- }- ],- "collation": "utf8mb4_0900_ai_ci",- "characterSet": "utf8mb4"- }- result: |- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `id` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci;-- --- -- View structure for `v1`- --- CREATE OR REPLACE VIEW `v1` AS select `t`.`id` AS `id` from `t`;-- --- -- Function structure for `CalcIncome`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome`( starting_value INT ) RETURNS int(11)- DETERMINISTIC- BEGIN-- DECLARE income INT;-- SET income = 0;-- label1: WHILE income <= 3000 DO- SET income = income + starting_value;- END WHILE label1;-- RETURN income;-- END ;;- DELIMITER ;-- --- -- Function structure for `CalcIncome3`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome3`( starting_value INT ) RETURNS int(11)- DETERMINISTIC- BEGIN-- DECLARE income INT;-- SET income = 0;-- label1: WHILE income <= 3000 DO- SET income = income + starting_value;- END WHILE label1;-- RETURN income;-- END ;;- DELIMITER ;-- --- -- Procedure structure for `citycount`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` PROCEDURE `citycount`(IN country CHAR(3), OUT cities INT)- BEGIN- SELECT 1000 INTO cities;- END ;;- DELIMITER ;-- description: Delete the the last function in schema- target: |-- {- "name": "test_function",- "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,- "position": 1,- "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"- }- ]- }- ],- "collation": "utf8mb4_0900_ai_ci",- "characterSet": "utf8mb4"- }- result: |- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `id` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci;-- --- -- View structure for `v1`- --- CREATE OR REPLACE VIEW `v1` AS select `t`.`id` AS `id` from `t`;-- --- -- Function structure for `CalcIncome`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome`( starting_value INT ) RETURNS int(11)- DETERMINISTIC- BEGIN-- DECLARE income INT;-- SET income = 0;-- label1: WHILE income <= 3000 DO- SET income = income + starting_value;- END WHILE label1;-- RETURN income;-- END ;;- DELIMITER ;-- --- -- Function structure for `CalcIncome2`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome2`( starting_value INT ) RETURNS int(11)- DETERMINISTIC- BEGIN-- DECLARE income INT;-- SET income = 0;-- label1: WHILE income <= 3000 DO- SET income = income + starting_value;- END WHILE label1;-- RETURN income;-- END ;;- DELIMITER ;-- --- -- Procedure structure for `citycount`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` PROCEDURE `citycount`(IN country CHAR(3), OUT cities INT)- BEGIN- SELECT 1000 INTO cities;- END ;;- DELIMITER ;diff --git a/backend/plugin/schema/mysql/testdata/get-design-schema/function/modify-function.yaml b/backend/plugin/schema/mysql/testdata/get-design-schema/function/modify-function.yamldeleted file mode 100644index 6d1385ded4..0000000000--- a/backend/plugin/schema/mysql/testdata/get-design-schema/function/modify-function.yaml+++ /dev/null@@ -1,90 +0,0 @@-- description: Modify function and delete another funcion- target: |-- {- "name": "test_function",- "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,- "position": 1,- "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"- }- ],- "procedures": [- {- "name": "citycount",- "definition": "CREATE DEFINER=`root`@`%` PROCEDURE `citycount`(IN country CHAR(3), OUT cities INT)\nBEGIN\n SELECT 1000 INTO cities;\n END"- }- ]- }- ],- "collation": "utf8mb4_0900_ai_ci",- "characterSet": "utf8mb4"- }- result: |- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `id` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci;-- --- -- View structure for `v1`- --- CREATE OR REPLACE VIEW `v1` AS select `t`.`id` AS `id` from `t`;-- --- -- Function structure for `CalcIncome`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome`( starting_value INT ) RETURNS int(11)- DETERMINISTIC- BEGIN-- DECLARE income INT;-- SET income = 0;-- label1: WHILE income <= 3000 DO- SET income = income + starting_value;- END WHILE label1;-- RETURN income;-- END ;;- DELIMITER ;-- --- -- Procedure structure for `citycount`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` PROCEDURE `citycount`(IN country CHAR(3), OUT cities INT)- BEGIN- SELECT 1000 INTO cities;- END ;;- DELIMITER ;diff --git a/backend/plugin/schema/mysql/testdata/get-design-schema/get_design_schema.yaml b/backend/plugin/schema/mysql/testdata/get-design-schema/get_design_schema.yamldeleted file mode 100644index b8a282cc35..0000000000--- a/backend/plugin/schema/mysql/testdata/get-design-schema/get_design_schema.yaml+++ /dev/null@@ -1,628 +0,0 @@-- description: New create table should not appear in delimiter block- target: |-- {- "schemas": [- {- "tables": [- {- "name": "u",- "engine": "InnoDB",- "columns": [- {- "name": "t",- "type": "text",- "position": 1- },- {- "name": "g",- "type": "geometry",- "position": 2- },- {- "name": "j",- "type": "json",- "position": 3- },- {- "name": "ti",- "type": "tinyint(1)",- "position": 4- },- {- "name": "tb",- "type": "tinyblob",- "nullable": true,- "position": 5,- "defaultNull": true- },- {- "name": "vc",- "type": "varchar(10)",- "position": 6- }- ],- "collation": "utf8mb4_0900_ai_ci"- },- {- "name": "wahaha",- "columns": [- {- "name": "id",- "type": "int"- }- ],- "indexes": [- {- "name": "PRIMARY",- "primary": true,- "expressions": [- "id"- ]- }- ]- }- ],- "functions": [- {- "name": "hello",- "definition": "CREATE DEFINER=`root`@`localhost` FUNCTION `hello`(s CHAR(20)) RETURNS char(50) CHARSET utf8mb4\n DETERMINISTIC\nRETURN CONCAT ('Hello, ', s, '!')"- }- ]- }- ]- }- result: |- --- -- Table structure for `u`- --- CREATE TABLE `u` (- `t` text NOT NULL,- `g` geometry NOT NULL,- `j` json NOT NULL,- `ti` tinyint(1) NOT NULL,- `tb` tinyblob,- `vc` varchar(10) NOT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci;-- --- -- Table structure for `wahaha`- --- CREATE TABLE `wahaha` (- `id` int NOT NULL,- PRIMARY KEY (`id`)- );-- --- -- Function structure for `hello`- --- DELIMITER ;;- CREATE DEFINER=`root`@`localhost` FUNCTION `hello`(s CHAR(20)) RETURNS char(50) CHARSET utf8mb4- DETERMINISTIC- RETURN CONCAT ('Hello, ', s, '!') ;;- DELIMITER ;-- description: ""- target: |-- {- "schemas": [- {- "tables": [- {- "name": "u",- "engine": "InnoDB",- "columns": [- {- "name": "t",- "type": "text",- "comment": "123",- "position": 1- },- {- "name": "g",- "type": "geometry",- "position": 2- },- {- "name": "j",- "type": "json",- "position": 3- },- {- "name": "ti",- "type": "tinyint(1)",- "position": 4- },- {- "name": "tb",- "type": "tinyblob",- "nullable": true,- "position": 5,- "defaultNull": true- }- ],- "collation": "utf8mb4_0900_ai_ci"- }- ],- "functions": [- {- "name": "hello",- "definition": "CREATE DEFINER=`root`@`localhost` FUNCTION `hello`(s CHAR(20)) RETURNS char(50) CHARSET utf8mb4\n DETERMINISTIC\nRETURN CONCAT ('Hello, ', s, '!')"- }- ]- }- ]- }- result: |- --- -- Table structure for `u`- --- CREATE TABLE `u` (- `t` text NOT NULL COMMENT '123',- `g` geometry NOT NULL,- `j` json NOT NULL,- `ti` tinyint(1) NOT NULL,- `tb` tinyblob- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci;-- --- -- Function structure for `hello`- --- DELIMITER ;;- CREATE DEFINER=`root`@`localhost` FUNCTION `hello`(s CHAR(20)) RETURNS char(50) CHARSET utf8mb4- DETERMINISTIC- RETURN CONCAT ('Hello, ', s, '!') ;;- DELIMITER ;-- description: ""- target: |-- {- "schemas": [- {- "tables": [- {- "name": "t",- "columns": [- {- "name": "a",- "type": "int"- },- {- "name": "b",- "type": "text",- "nullable": true,- "defaultNull": true- },- {- "name": "c",- "type": "text",- "nullable": false,- "defaultExpression": "('aaa')"- },- {- "name": "d",- "type": "text",- "nullable": true,- "defaultExpression": "(NULL)"- }- ],- "indexes": [- {- "name": "t_a_uniq_idx",- "expressions": [- "a"- ],- "unique": true,- "primary": false,- "visible": true,- "comment": "this is my comment ''!!"- }- ]- },- {- "name": "t4",- "columns": [- {- "name": "a",- "type": "varchar(10)",- "default": "default value",- "comment": "this is comment, aha"- },- {- "name": "b",- "type": "char(10)"- },- {- "name": "c",- "type": "int",- "defaultExpression": "AUTO_INCREMENT"- },- {- "name": "e",- "nullable": true,- "type": "int"- }- ],- "indexes": [- {- "name": "PRIMARY",- "expressions": [- "a",- "b",- "c"- ],- "unique": true,- "primary": true,- "visible": true,- "comment": "primary key of multiple key fields"- },- {- "name": "idx_b_5",- "expressions": [- "b"- ],- "keyLength": [- 5- ]- }- ],- "foreignKeys": [- {- "name": "fk1",- "columns": [- "b"- ],- "referencedTable": "t2",- "referencedColumns": [- "b"- ]- }- ]- },- {- "name": "t2",- "columns": [- {- "name": "b",- "nullable": true,- "type": "int"- },- {- "name": "a",- "nullable": true,- "type": "int"- }- ],- "indexes": [- {- "name": "PRIMARY",- "expressions": [- "b"- ],- "unique": true,- "primary": true,- "visible": true- }- ],- "foreignKeys": [- {- "name": "fk1",- "columns": [- "b"- ],- "referencedTable": "t4",- "referencedColumns": [- "b"- ]- }- ]- },- {- "name": "t5",- "columns": [- {- "name": "a",- "type": "int",- "comment": "this is comment"- },- {- "name": "b",- "type": "VARCHAR(20)"- },- {- "name": "c",- "type": "int"- },- {- "name": "d",- "nullable": true,- "type": "text"- }- ],- "indexes": [- {- "name": "PRIMARY",- "expressions": [- "a"- ],- "unique": true,- "primary": true,- "visible": true- },- {- "name": "t_c_uniq_idx",- "expressions": [- "c"- ],- "unique": true,- "visible": true- },- {- "name": "t_c_plus_5_uniq_idx",- "expressions": [- "((`c` + 5))"- ],- "unique": true,- "visible": true- },- {- "name": "t_c_plus_5_t_c_plus_3_uniq_idx",- "expressions": [- "((`c` + 5))",- "((`c` + 3))"- ],- "unique": true,- "visible": true- },- {- "name": "idx_c",- "expressions": [- "c"- ],- "visible": true- },- {- "name": "idx_d",- "expressions": [- "d"- ],- "visible": true- },- {- "name": "t_d_fulltext_idx",- "expressions": [- "d"- ],- "visible": true- }- ]- }- ]- }- ]- }- result: |- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `a` int NOT NULL,- `b` text,- `c` text NOT NULL DEFAULT ('aaa'),- `d` text DEFAULT (NULL),- UNIQUE KEY `t_a_uniq_idx` (`a`) COMMENT 'this is my comment ''!!'- );-- --- -- Table structure for `t4`- --- CREATE TABLE `t4` (- `a` varchar(10) NOT NULL DEFAULT 'default value' COMMENT 'this is comment, aha',- `b` char(10) NOT NULL,- `c` int NOT NULL AUTO_INCREMENT,- `e` int,- PRIMARY KEY (`a`, `b`, `c`) COMMENT 'primary key of multiple key fields',- KEY `idx_b_5` (`b`(5)),- CONSTRAINT `fk1` FOREIGN KEY (`b`) REFERENCES `t2` (`b`)- );-- --- -- Table structure for `t2`- --- CREATE TABLE `t2` (- `b` int,- `a` int,- PRIMARY KEY (`b`),- CONSTRAINT `fk1` FOREIGN KEY (`b`) REFERENCES `t4` (`b`)- );-- --- -- Table structure for `t5`- --- CREATE TABLE `t5` (- `a` int NOT NULL COMMENT 'this is comment',- `b` varchar(20) NOT NULL,- `c` int NOT NULL,- `d` text,- PRIMARY KEY (`a`),- KEY `idx_c` (`c`),- KEY `idx_d` (`d`),- UNIQUE KEY `t_c_plus_5_t_c_plus_3_uniq_idx` (((`c` + 5)),((`c` + 3))),- UNIQUE KEY `t_c_plus_5_uniq_idx` (((`c` + 5))),- UNIQUE KEY `t_c_uniq_idx` (`c`),- KEY `t_d_fulltext_idx` (`d`)- );-- description: ""- target: |-- {- "schemas": [- {- "tables": [- {- "name": "t",- "columns": [- {- "name": "a",- "type": "int"- }- ],- "comment": "this is comment"- }- ]- }- ]- }- result: |- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `a` int NOT NULL- ) COMMENT 'this is comment';-- description: ""- target: |-- {- "schemas": [- {- "tables": [- {- "name": "t1",- "columns": [- {- "name": "a",- "nullable": true,- "type": "int",- "default": "\\'escaped"- },- {- "name": "b",- "nullable": true,- "type": "int(11)"- }- ]- },- {- "name": "t2",- "columns": [- {- "name": "a",- "nullable": true,- "type": "int",- "defaultExpression": "AUTO_INCREMENT"- }- ]- },- {- "name": "t3",- "columns": [- {- "name": "a",- "nullable": true,- "type": "int",- "defaultExpression": "AUTO_INCREMENT"- }- ]- },- {- "name": "t4",- "columns": [- {- "name": "a",- "nullable": true,- "type": "int",- "defaultExpression": "1"- }- ]- },- {- "name": "t4",- "columns": [- {- "name": "a",- "nullable": true,- "type": "int",- "default": "\\'a\\'"- }- ]- }- ]- }- ]- }- result: |- --- -- Table structure for `t1`- --- CREATE TABLE `t1` (- `a` int DEFAULT '\'escaped',- `b` int- );-- --- -- Table structure for `t2`- --- CREATE TABLE `t2` (- `a` int AUTO_INCREMENT- );-- --- -- Table structure for `t3`- --- CREATE TABLE `t3` (- `a` int AUTO_INCREMENT- );-- --- -- Table structure for `t4`- --- CREATE TABLE `t4` (- `a` int DEFAULT '\'a\''- );-- description: ""- target: |-- {- "schemas": [- {- "tables": [- {- "name": "t",- "columns": [- {- "name": "a",- "type": "int"- },- {- "name": "b",- "type": "varchar(255)"- },- {- "name": "c",- "type": "timestamp(3)",- "defaultExpression": "CURRENT_TIMESTAMP(3)",- "onUpdate": "CURRENT_TIMESTAMP(3)"- },- {- "name": "d",- "type": "timestamp",- "defaultExpression": "CURRENT_TIMESTAMP",- "onUpdate": "CURRENT_TIMESTAMP"- },- {- "name": "e",- "type": "timestamp",- "defaultExpression": "CURRENT_TIMESTAMP"- }- ]- }- ]- }- ]- }- result: |- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `a` int NOT NULL,- `b` varchar(255) NOT NULL,- `c` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3),- `d` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,- `e` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP- );diff --git a/backend/plugin/schema/mysql/testdata/get-design-schema/partition/hash.yaml b/backend/plugin/schema/mysql/testdata/get-design-schema/partition/hash.yamldeleted file mode 100644index 8743908793..0000000000--- a/backend/plugin/schema/mysql/testdata/get-design-schema/partition/hash.yaml+++ /dev/null@@ -1,46 +0,0 @@-- description: Easy Hash Partition- target: |-- {- "schemas": [- {- "tables": [- {- "name": "hash_partition",- "engine": "InnoDB",- "columns": [- {- "name": "id",- "type": "int",- "nullable": true,- "position": 1,- "defaultNull": true- }- ],- "partitions": [- {- "name": "p0",- "type": "HASH",- "expression": "`id`"- },- {- "name": "p1",- "type": "HASH",- "expression": "`id`"- }- ],- "collation": "utf8mb4_0900_ai_ci"- }- ]- }- ]- }- result: |- --- -- Table structure for `hash_partition`- --- CREATE TABLE `hash_partition` (- `id` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci- /*!50100 PARTITION BY HASH (`id`)- (PARTITION p0 ENGINE=InnoDB,- PARTITION p1 ENGINE=InnoDB) */;diff --git a/backend/plugin/schema/mysql/testdata/get-design-schema/partition/keep-algorithm.yaml b/backend/plugin/schema/mysql/testdata/get-design-schema/partition/keep-algorithm.yamldeleted file mode 100644index 2db96866b8..0000000000--- a/backend/plugin/schema/mysql/testdata/get-design-schema/partition/keep-algorithm.yaml+++ /dev/null@@ -1,104 +0,0 @@-- description: Keep subpartition algorithm- target: |-- {- "schemas": [- {- "tables": [- {- "name": "subpartition_algorithm",- "engine": "InnoDB",- "columns": [- {- "name": "id",- "type": "int",- "nullable": true,- "position": 1,- "defaultNull": true- }- ],- "partitions": [- {- "name": "p0",- "type": "RANGE",- "value": "100",- "expression": "id",- "subpartitions": [- {- "name": "p0s0",- "type": "KEY",- "expression": "`id`",- "useDefault": "2"- },- {- "name": "p0s1",- "type": "KEY",- "expression": "`id`",- "useDefault": "2"- }- ]- }- ],- "collation": "utf8mb4_0900_ai_ci"- }- ]- }- ]- }- result: |- --- -- Table structure for `subpartition_algorithm`- --- CREATE TABLE `subpartition_algorithm` (- `id` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci- /*!50100 PARTITION BY RANGE (`id`)- SUBPARTITION BY KEY (id)- SUBPARTITIONS 2- (PARTITION p0 VALUES LESS THAN (100) ENGINE=InnoDB) */;-- description: Keep partition algorithm- target: |-- {- "schemas": [- {- "tables": [- {- "name": "key_algorithm",- "engine": "InnoDB",- "columns": [- {- "name": "id",- "type": "int",- "nullable": true,- "position": 1,- "defaultNull": true- }- ],- "partitions": [- {- "name": "p0",- "type": "KEY",- "expression": "`id`",- "useDefault": "2"- },- {- "name": "p1",- "type": "KEY",- "expression": "`id`",- "useDefault": "2"- }- ],- "collation": "utf8mb4_0900_ai_ci"- }- ]- }- ]- }- result: |- --- -- Table structure for `key_algorithm`- --- CREATE TABLE `key_algorithm` (- `id` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci- /*!50100 PARTITION BY KEY (id)- PARTITIONS 2 */;diff --git a/backend/plugin/schema/mysql/testdata/get-design-schema/partition/keep-version-comment.yaml b/backend/plugin/schema/mysql/testdata/get-design-schema/partition/keep-version-comment.yamldeleted file mode 100644index a705c00bf6..0000000000--- a/backend/plugin/schema/mysql/testdata/get-design-schema/partition/keep-version-comment.yaml+++ /dev/null@@ -1,57 +0,0 @@-- description: Default Subpartition Num- target: |-- {- "schemas": [- {- "tables": [- {- "name": "version_comment",- "engine": "InnoDB",- "columns": [- {- "name": "id",- "type": "int",- "nullable": true,- "position": 1,- "defaultNull": true- },- {- "name": "name",- "type": "varchar(10)",- "nullable": true,- "position": 2,- "collation": "utf8mb4_0900_ai_ci",- "defaultNull": true,- "characterSet": "utf8mb4"- }- ],- "partitions": [- {- "name": "p0",- "type": "HASH",- "expression": "`id`",- "useDefault": "2"- },- {- "name": "p1",- "type": "HASH",- "expression": "`id`",- "useDefault": "2"- }- ],- "collation": "utf8mb4_0900_ai_ci"- }- ]- }- ]- }- result: |- --- -- Table structure for `version_comment`- --- CREATE TABLE `version_comment` (- `id` int DEFAULT NULL,- `name` varchar(10) DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci- /*!50100 PARTITION BY HASH (`id`)- PARTITIONS 2 */;diff --git a/backend/plugin/schema/mysql/testdata/get-design-schema/partition/key.yaml b/backend/plugin/schema/mysql/testdata/get-design-schema/partition/key.yamldeleted file mode 100644index a8fbec7ab7..0000000000--- a/backend/plugin/schema/mysql/testdata/get-design-schema/partition/key.yaml+++ /dev/null@@ -1,54 +0,0 @@-- description: Easy Key Partition- target: |-- {- "schemas": [- {- "tables": [- {- "name": "key_partition_multiple",- "engine": "InnoDB",- "columns": [- {- "name": "id",- "type": "int",- "nullable": true,- "position": 1,- "defaultNull": true- },- {- "name": "id2",- "type": "int",- "nullable": true,- "position": 2,- "defaultNull": true- }- ],- "partitions": [- {- "name": "p0",- "type": "KEY",- "expression": "`id`,`id2`"- },- {- "name": "p1",- "type": "KEY",- "expression": "`id`,`id2`"- }- ],- "collation": "utf8mb4_0900_ai_ci"- }- ]- }- ]- }- result: |- --- -- Table structure for `key_partition_multiple`- --- CREATE TABLE `key_partition_multiple` (- `id` int DEFAULT NULL,- `id2` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci- /*!50100 PARTITION BY KEY (id,id2)- (PARTITION p0 ENGINE=InnoDB,- PARTITION p1 ENGINE=InnoDB) */;diff --git a/backend/plugin/schema/mysql/testdata/get-design-schema/partition/list.yaml b/backend/plugin/schema/mysql/testdata/get-design-schema/partition/list.yamldeleted file mode 100644index e67678d706..0000000000--- a/backend/plugin/schema/mysql/testdata/get-design-schema/partition/list.yaml+++ /dev/null@@ -1,281 +0,0 @@-- description: List Columns Partition Hash Subpartition- target: |-- {- "schemas": [- {- "tables": [- {- "name": "list_columns_partition_hash_subpartition",- "engine": "InnoDB",- "columns": [- {- "name": "id",- "type": "int",- "position": 1- },- {- "name": "d",- "type": "date",- "position": 2- }- ],- "indexes": [- {- "name": "PRIMARY",- "type": "BTREE",- "unique": true,- "primary": true,- "visible": true,- "keyLength": [- "-1",- "-1"- ],- "expressions": [- "id",- "d"- ]- }- ],- "partitions": [- {- "name": "p0",- "type": "LIST_COLUMNS",- "value": "(1,'2012-01-01'),(2,'2012-01-02'),(3,'2012-01-03')",- "expression": "`id`,`d`",- "subpartitions": [- {- "name": "p0sp0",- "type": "HASH",- "value": "(1,'2012-01-01'),(2,'2012-01-02'),(3,'2012-01-03')",- "expression": "`id`"- },- {- "name": "p0sp1",- "type": "HASH",- "value": "(1,'2012-01-01'),(2,'2012-01-02'),(3,'2012-01-03')",- "expression": "`id`"- }- ]- },- {- "name": "p1",- "type": "LIST_COLUMNS",- "value": "(4,'2012-01-01'),(5,'2012-01-02'),(6,'2012-01-03')",- "expression": "`id`,`d`",- "subpartitions": [- {- "name": "p1sp0",- "type": "HASH",- "value": "(4,'2012-01-01'),(5,'2012-01-02'),(6,'2012-01-03')",- "expression": "`id`"- },- {- "name": "p1sp1",- "type": "HASH",- "value": "(4,'2012-01-01'),(5,'2012-01-02'),(6,'2012-01-03')",- "expression": "`id`"- }- ]- },- {- "name": "p2",- "type": "LIST_COLUMNS",- "value": "(7,'2012-01-01'),(8,'2012-01-02'),(9,'2012-01-03')",- "expression": "`id`,`d`",- "subpartitions": [- {- "name": "p2sp0",- "type": "HASH",- "value": "(7,'2012-01-01'),(8,'2012-01-02'),(9,'2012-01-03')",- "expression": "`id`"- },- {- "name": "p2sp1",- "type": "HASH",- "value": "(7,'2012-01-01'),(8,'2012-01-02'),(9,'2012-01-03')",- "expression": "`id`"- }- ]- },- {- "name": "p_null",- "type": "LIST_COLUMNS",- "value": "(NULL,NULL)",- "expression": "`id`,`d`",- "subpartitions": [- {- "name": "p3sp0",- "type": "HASH",- "value": "(NULL,NULL)",- "expression": "`id`"- },- {- "name": "p3sp1",- "type": "HASH",- "value": "(NULL,NULL)",- "expression": "`id`"- }- ]- }- ],- "collation": "utf8mb4_0900_ai_ci"- }- ]- }- ]- }- result: |- --- -- Table structure for `list_columns_partition_hash_subpartition`- --- CREATE TABLE `list_columns_partition_hash_subpartition` (- `id` int NOT NULL,- `d` date NOT NULL,- PRIMARY KEY (`id`, `d`)- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci- /*!50500 PARTITION BY LIST COLUMNS(id,d)- SUBPARTITION BY HASH (`id`)- (PARTITION p0 VALUES IN ((1,'2012-01-01'),(2,'2012-01-02'),(3,'2012-01-03'))- (SUBPARTITION p0sp0 ENGINE=InnoDB,- SUBPARTITION p0sp1 ENGINE=InnoDB),- PARTITION p1 VALUES IN ((4,'2012-01-01'),(5,'2012-01-02'),(6,'2012-01-03'))- (SUBPARTITION p1sp0 ENGINE=InnoDB,- SUBPARTITION p1sp1 ENGINE=InnoDB),- PARTITION p2 VALUES IN ((7,'2012-01-01'),(8,'2012-01-02'),(9,'2012-01-03'))- (SUBPARTITION p2sp0 ENGINE=InnoDB,- SUBPARTITION p2sp1 ENGINE=InnoDB),- PARTITION p_null VALUES IN ((NULL,NULL))- (SUBPARTITION p3sp0 ENGINE=InnoDB,- SUBPARTITION p3sp1 ENGINE=InnoDB)) */;-- description: List Columns Partition- target: |-- {- "schemas": [- {- "tables": [- {- "name": "list_columns_partition",- "engine": "InnoDB",- "columns": [- {- "name": "id",- "type": "int",- "nullable": true,- "position": 1,- "defaultNull": true- },- {- "name": "d",- "type": "date",- "nullable": true,- "position": 2,- "defaultNull": true- }- ],- "partitions": [- {- "name": "p0",- "type": "LIST_COLUMNS",- "value": "(1,'2012-01-01'),(2,'2012-01-02'),(3,'2012-01-03')",- "expression": "`id`,`d`"- },- {- "name": "p1",- "type": "LIST_COLUMNS",- "value": "(4,'2012-01-01'),(5,'2012-01-02'),(6,'2012-01-03')",- "expression": "`id`,`d`"- },- {- "name": "p2",- "type": "LIST_COLUMNS",- "value": "(7,'2012-01-01'),(8,'2012-01-02'),(9,'2012-01-03')",- "expression": "`id`,`d`"- },- {- "name": "p_null",- "type": "LIST_COLUMNS",- "value": "(NULL,NULL)",- "expression": "`id`,`d`"- }- ],- "collation": "utf8mb4_0900_ai_ci"- }- ]- }- ]- }- result: |- --- -- Table structure for `list_columns_partition`- --- CREATE TABLE `list_columns_partition` (- `id` int DEFAULT NULL,- `d` date DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci- /*!50500 PARTITION BY LIST COLUMNS(id,d)- (PARTITION p0 VALUES IN ((1,'2012-01-01'),(2,'2012-01-02'),(3,'2012-01-03')) ENGINE=InnoDB,- PARTITION p1 VALUES IN ((4,'2012-01-01'),(5,'2012-01-02'),(6,'2012-01-03')) ENGINE=InnoDB,- PARTITION p2 VALUES IN ((7,'2012-01-01'),(8,'2012-01-02'),(9,'2012-01-03')) ENGINE=InnoDB,- PARTITION p_null VALUES IN ((NULL,NULL)) ENGINE=InnoDB) */;-- description: Easy List Partition- target: |-- {- "schemas": [- {- "tables": [- {- "name": "u",- "engine": "InnoDB",- "columns": [- {- "name": "id",- "type": "int",- "nullable": true,- "position": 1,- "defaultNull": true- }- ],- "partitions": [- {- "name": "p0",- "type": "LIST",- "value": "1,2,3",- "expression": "`id`"- },- {- "name": "p1",- "type": "LIST",- "value": "4,5,6",- "expression": "`id`"- },- {- "name": "p2",- "type": "LIST",- "value": "7,8,9",- "expression": "`id`"- },- {- "name": "p_null",- "type": "LIST",- "value": "NULL",- "expression": "`id`"- }- ],- "collation": "utf8mb4_0900_ai_ci"- }- ]- }- ]- }- result: |- --- -- Table structure for `u`- --- CREATE TABLE `u` (- `id` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci- /*!50100 PARTITION BY LIST (`id`)- (PARTITION p0 VALUES IN (1,2,3) ENGINE=InnoDB,- PARTITION p1 VALUES IN (4,5,6) ENGINE=InnoDB,- PARTITION p2 VALUES IN (7,8,9) ENGINE=InnoDB,- PARTITION p_null VALUES IN (NULL) ENGINE=InnoDB) */;diff --git a/backend/plugin/schema/mysql/testdata/get-design-schema/partition/range.yaml b/backend/plugin/schema/mysql/testdata/get-design-schema/partition/range.yamldeleted file mode 100644index 78aaf6ffcc..0000000000--- a/backend/plugin/schema/mysql/testdata/get-design-schema/partition/range.yaml+++ /dev/null@@ -1,245 +0,0 @@-- description: Range Columns- target: |-- {- "schemas": [- {- "tables": [- {- "name": "range_columns_partition_hash_subpartition",- "engine": "InnoDB",- "columns": [- {- "name": "id",- "type": "int",- "nullable": true,- "position": 1,- "defaultNull": true- },- {- "name": "d",- "type": "date",- "nullable": true,- "position": 2,- "defaultNull": true- }- ],- "partitions": [- {- "name": "p0",- "type": "RANGE_COLUMNS",- "value": "1,'2012-01-01 00:00:00'",- "expression": "`id`,`d`",- "subpartitions": [- {- "name": "p0sp0",- "type": "KEY",- "value": "1,'2012-01-01 00:00:00'",- "expression": "`id`"- },- {- "name": "p0sp1",- "type": "KEY",- "value": "1,'2012-01-01 00:00:00'",- "expression": "`id`"- }- ]- },- {- "name": "p1",- "type": "RANGE_COLUMNS",- "value": "2,'2012-01-02 00:00:00'",- "expression": "`id`,`d`",- "subpartitions": [- {- "name": "p1sp0",- "type": "KEY",- "value": "2,'2012-01-02 00:00:00'",- "expression": "`id`"- },- {- "name": "p1sp1",- "type": "KEY",- "value": "2,'2012-01-02 00:00:00'",- "expression": "`id`"- }- ]- }- ],- "collation": "utf8mb4_0900_ai_ci"- }- ]- }- ]- }- result: |- --- -- Table structure for `range_columns_partition_hash_subpartition`- --- CREATE TABLE `range_columns_partition_hash_subpartition` (- `id` int DEFAULT NULL,- `d` date DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci- /*!50500 PARTITION BY RANGE COLUMNS(id,d)- SUBPARTITION BY KEY (id)- (PARTITION p0 VALUES LESS THAN (1,'2012-01-01 00:00:00')- (SUBPARTITION p0sp0 ENGINE=InnoDB,- SUBPARTITION p0sp1 ENGINE=InnoDB),- PARTITION p1 VALUES LESS THAN (2,'2012-01-02 00:00:00')- (SUBPARTITION p1sp0 ENGINE=InnoDB,- SUBPARTITION p1sp1 ENGINE=InnoDB)) */;-- description: Subpartition- target: |-- {- "schemas": [- {- "tables": [- {- "name": "range_partition_hash_subpartition",- "engine": "InnoDB",- "columns": [- {- "name": "id",- "type": "int",- "nullable": true,- "position": 1,- "defaultNull": true- },- {- "name": "name",- "type": "varchar(10)",- "nullable": true,- "position": 2,- "collation": "utf8mb4_0900_ai_ci",- "defaultNull": true,- "characterSet": "utf8mb4"- }- ],- "partitions": [- {- "name": "p0",- "type": "RANGE",- "value": "10",- "expression": "`id`",- "subpartitions": [- {- "name": "p0s0",- "type": "HASH",- "value": "10",- "expression": "`id`"- },- {- "name": "p0s1",- "type": "HASH",- "value": "10",- "expression": "`id`"- }- ]- },- {- "name": "p1",- "type": "RANGE",- "value": "MAXVALUE",- "expression": "`id`",- "subpartitions": [- {- "name": "p1s0",- "type": "HASH",- "value": "MAXVALUE",- "expression": "`id`"- },- {- "name": "p1s1",- "type": "HASH",- "value": "MAXVALUE",- "expression": "`id`"- }- ]- }- ],- "collation": "utf8mb4_0900_ai_ci"- }- ]- }- ]- }- result: |- --- -- Table structure for `range_partition_hash_subpartition`- --- CREATE TABLE `range_partition_hash_subpartition` (- `id` int DEFAULT NULL,- `name` varchar(10) DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci- /*!50100 PARTITION BY RANGE (`id`)- SUBPARTITION BY HASH (`id`)- (PARTITION p0 VALUES LESS THAN (10)- (SUBPARTITION p0s0 ENGINE=InnoDB,- SUBPARTITION p0s1 ENGINE=InnoDB),- PARTITION p1 VALUES LESS THAN MAXVALUE- (SUBPARTITION p1s0 ENGINE=InnoDB,- SUBPARTITION p1s1 ENGINE=InnoDB)) */;-- description: Easy Range Partition- target: |-- {- "schemas": [- {- "tables": [- {- "name": "range_partition",- "engine": "InnoDB",- "columns": [- {- "name": "id",- "type": "int",- "nullable": true,- "position": 1,- "defaultNull": true- },- {- "name": "name",- "type": "varchar(10)",- "nullable": true,- "position": 2,- "collation": "utf8mb4_0900_ai_ci",- "defaultNull": true,- "characterSet": "utf8mb4"- }- ],- "partitions": [- {- "name": "p0",- "type": "RANGE",- "value": "100",- "expression": "`id`"- },- {- "name": "p1",- "type": "RANGE",- "value": "200",- "expression": "`id`"- },- {- "name": "p2",- "type": "RANGE",- "value": "MAXVALUE",- "expression": "`id`"- }- ],- "collation": "utf8mb4_0900_ai_ci"- }- ]- }- ]- }- result: |- --- -- Table structure for `range_partition`- --- CREATE TABLE `range_partition` (- `id` int DEFAULT NULL,- `name` varchar(10) DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci- /*!50100 PARTITION BY RANGE (`id`)- (PARTITION p0 VALUES LESS THAN (100) ENGINE=InnoDB,- PARTITION p1 VALUES LESS THAN (200) ENGINE=InnoDB,- PARTITION p2 VALUES LESS THAN MAXVALUE ENGINE=InnoDB) */;diff --git a/backend/plugin/schema/mysql/testdata/get-design-schema/partition/write-default.yaml b/backend/plugin/schema/mysql/testdata/get-design-schema/partition/write-default.yamldeleted file mode 100644index a77f5af88e..0000000000--- a/backend/plugin/schema/mysql/testdata/get-design-schema/partition/write-default.yaml+++ /dev/null@@ -1,109 +0,0 @@-- description: Default Subpartition Num- target: |-- {- "schemas": [- {- "tables": [- {- "name": "range_partition",- "engine": "InnoDB",- "columns": [- {- "name": "id",- "type": "int",- "nullable": true,- "position": 1,- "defaultNull": true- },- {- "name": "name",- "type": "varchar(10)",- "nullable": true,- "position": 2,- "collation": "utf8mb4_0900_ai_ci",- "defaultNull": true,- "characterSet": "utf8mb4"- }- ],- "partitions": [- {- "name": "p0",- "type": "RANGE",- "value": "100",- "expression": "`id`",- "subpartitions": [- {- "name": "p0s0",- "type": "HASH",- "expression": "`id`",- "useDefault": "2"- },- {- "name": "p0s1",- "type": "HASH",- "expression": "`id`",- "useDefault": "2"- }- ]- },- {- "name": "p1",- "type": "RANGE",- "value": "200",- "expression": "`id`",- "subpartitions": [- {- "name": "p1s0",- "type": "HASH",- "expression": "`id`",- "useDefault": "2"- },- {- "name": "p1s1",- "type": "HASH",- "expression": "`id`",- "useDefault": "2"- }- ]- },- {- "name": "p2",- "type": "RANGE",- "value": "MAXVALUE",- "expression": "`id`",- "subpartitions": [- {- "name": "p2s0",- "type": "HASH",- "expression": "`id`",- "useDefault": "2"- },- {- "name": "p2s1",- "type": "HASH",- "expression": "`id`",- "useDefault": "2"- }- ]- }- ],- "collation": "utf8mb4_0900_ai_ci"- }- ]- }- ]- }- result: |- --- -- Table structure for `range_partition`- --- CREATE TABLE `range_partition` (- `id` int DEFAULT NULL,- `name` varchar(10) DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci- /*!50100 PARTITION BY RANGE (`id`)- SUBPARTITION BY HASH (`id`)- SUBPARTITIONS 2- (PARTITION p0 VALUES LESS THAN (100) ENGINE=InnoDB,- PARTITION p1 VALUES LESS THAN (200) ENGINE=InnoDB,- PARTITION p2 VALUES LESS THAN MAXVALUE ENGINE=InnoDB) */;diff --git a/backend/plugin/schema/mysql/testdata/get-design-schema/procedure/create-new-procedure.yaml b/backend/plugin/schema/mysql/testdata/get-design-schema/procedure/create-new-procedure.yamldeleted file mode 100644index fa46da58ae..0000000000--- a/backend/plugin/schema/mysql/testdata/get-design-schema/procedure/create-new-procedure.yaml+++ /dev/null@@ -1,140 +0,0 @@-- description: Create new procedure in schema without procedure- target: |-- {- "name": "test_function",- "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,- "position": 1,- "defaultNull": true- }- ],- "dataSize": "16384",- "collation": "utf8mb4_0900_ai_ci"- }- ],- "procedures": [- {- "name": "citycount",- "definition": "CREATE DEFINER=`root`@`%` PROCEDURE `citycount`(IN country CHAR(3), OUT cities INT)\nBEGIN\n SELECT 1000 INTO cities;\n END"- }- ]- }- ],- "collation": "utf8mb4_0900_ai_ci",- "characterSet": "utf8mb4"- }- result: |- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `id` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci;-- --- -- View structure for `v1`- --- CREATE OR REPLACE VIEW `v1` AS select `t`.`id` AS `id` from `t`;-- --- -- Procedure structure for `citycount`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` PROCEDURE `citycount`(IN country CHAR(3), OUT cities INT)- BEGIN- SELECT 1000 INTO cities;- END ;;- DELIMITER ;-- description: Create procedure in schema with function- target: |-- {- "name": "test_function",- "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,- "position": 1,- "defaultNull": true- }- ],- "dataSize": "16384",- "collation": "utf8mb4_0900_ai_ci"- }- ],- "procedures": [- {- "name": "citycount",- "definition": "CREATE DEFINER=`root`@`%` PROCEDURE `citycount`(IN country CHAR(3), OUT cities INT)\nBEGIN\n SELECT 1000 INTO cities;\n END"- },- {- "name": "citycount2",- "definition": "CREATE DEFINER=`root`@`%` PROCEDURE `citycount2`(IN country CHAR(3), OUT cities INT)\nBEGIN\n SELECT 1000 INTO cities;\n END"- }- ]- }- ],- "collation": "utf8mb4_0900_ai_ci",- "characterSet": "utf8mb4"- }- result: |- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `id` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci;-- --- -- View structure for `v1`- --- CREATE OR REPLACE VIEW `v1` AS select `t`.`id` AS `id` from `t`;-- --- -- Procedure structure for `citycount`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` PROCEDURE `citycount`(IN country CHAR(3), OUT cities INT)- BEGIN- SELECT 1000 INTO cities;- END ;;- DELIMITER ;-- --- -- Procedure structure for `citycount2`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` PROCEDURE `citycount2`(IN country CHAR(3), OUT cities INT)- BEGIN- SELECT 1000 INTO cities;- END ;;- DELIMITER ;diff --git a/backend/plugin/schema/mysql/testdata/get-design-schema/procedure/delete-procedure-without-set.yaml b/backend/plugin/schema/mysql/testdata/get-design-schema/procedure/delete-procedure-without-set.yamldeleted file mode 100644index cfc0b6e710..0000000000--- a/backend/plugin/schema/mysql/testdata/get-design-schema/procedure/delete-procedure-without-set.yaml+++ /dev/null@@ -1,312 +0,0 @@-- description: Delete first procedures in schema- target: |-- {- "name": "test_function",- "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,- "position": 1,- "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"- }- ],- "procedures": [- {- "name": "citycount2",- "definition": "CREATE DEFINER=`root`@`%` PROCEDURE `citycount2`(IN country CHAR(3), OUT cities INT)\nBEGIN\n SELECT 1000 INTO cities;\n END"- },- {- "name": "citycount3",- "definition": "CREATE DEFINER=`root`@`%` PROCEDURE `citycount3`(IN country CHAR(3), OUT cities INT)\nBEGIN\n SELECT 1000 INTO cities;\n END"- }- ]- }- ],- "collation": "utf8mb4_0900_ai_ci",- "characterSet": "utf8mb4"- }- result: |- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `id` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci;-- --- -- View structure for `v1`- --- CREATE OR REPLACE VIEW `v1` AS select `t`.`id` AS `id` from `t`;-- --- -- Function structure for `CalcIncome`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome`( starting_value INT ) RETURNS int(11)- DETERMINISTIC- BEGIN-- DECLARE income INT;-- SET income = 0;-- label1: WHILE income <= 3000 DO- SET income = income + starting_value;- END WHILE label1;-- RETURN income;-- END ;;- DELIMITER ;-- --- -- Procedure structure for `citycount2`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` PROCEDURE `citycount2`(IN country CHAR(3), OUT cities INT)- BEGIN- SELECT 1000 INTO cities;- END ;;- DELIMITER ;-- --- -- Procedure structure for `citycount3`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` PROCEDURE `citycount3`(IN country CHAR(3), OUT cities INT)- BEGIN- SELECT 1000 INTO cities;- END ;;- DELIMITER ;-- description: Delete second procedures in schema- target: |-- {- "name": "test_function",- "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,- "position": 1,- "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"- }- ],- "procedures": [- {- "name": "citycount",- "definition": "CREATE DEFINER=`root`@`%` PROCEDURE `citycount`(IN country CHAR(3), OUT cities INT)\nBEGIN\n SELECT 1000 INTO cities;\n END"- },- {- "name": "citycount3",- "definition": "CREATE DEFINER=`root`@`%` PROCEDURE `citycount3`(IN country CHAR(3), OUT cities INT)\nBEGIN\n SELECT 1000 INTO cities;\n END"- }- ]- }- ],- "collation": "utf8mb4_0900_ai_ci",- "characterSet": "utf8mb4"- }- result: |- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `id` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci;-- --- -- View structure for `v1`- --- CREATE OR REPLACE VIEW `v1` AS select `t`.`id` AS `id` from `t`;-- --- -- Function structure for `CalcIncome`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome`( starting_value INT ) RETURNS int(11)- DETERMINISTIC- BEGIN-- DECLARE income INT;-- SET income = 0;-- label1: WHILE income <= 3000 DO- SET income = income + starting_value;- END WHILE label1;-- RETURN income;-- END ;;- DELIMITER ;-- --- -- Procedure structure for `citycount`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` PROCEDURE `citycount`(IN country CHAR(3), OUT cities INT)- BEGIN- SELECT 1000 INTO cities;- END ;;- DELIMITER ;-- --- -- Procedure structure for `citycount3`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` PROCEDURE `citycount3`(IN country CHAR(3), OUT cities INT)- BEGIN- SELECT 1000 INTO cities;- END ;;- DELIMITER ;-- description: Delete last procedures in schema- target: |-- {- "name": "test_function",- "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,- "position": 1,- "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"- }- ],- "procedures": [- {- "name": "citycount",- "definition": "CREATE DEFINER=`root`@`%` PROCEDURE `citycount`(IN country CHAR(3), OUT cities INT)\nBEGIN\n SELECT 1000 INTO cities;\n END"- },- {- "name": "citycount2",- "definition": "CREATE DEFINER=`root`@`%` PROCEDURE `citycount2`(IN country CHAR(3), OUT cities INT)\nBEGIN\n SELECT 1000 INTO cities;\n END"- }- ]- }- ],- "collation": "utf8mb4_0900_ai_ci",- "characterSet": "utf8mb4"- }- result: |- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `id` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci;-- --- -- View structure for `v1`- --- CREATE OR REPLACE VIEW `v1` AS select `t`.`id` AS `id` from `t`;-- --- -- Function structure for `CalcIncome`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome`( starting_value INT ) RETURNS int(11)- DETERMINISTIC- BEGIN-- DECLARE income INT;-- SET income = 0;-- label1: WHILE income <= 3000 DO- SET income = income + starting_value;- END WHILE label1;-- RETURN income;-- END ;;- DELIMITER ;-- --- -- Procedure structure for `citycount`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` PROCEDURE `citycount`(IN country CHAR(3), OUT cities INT)- BEGIN- SELECT 1000 INTO cities;- END ;;- DELIMITER ;-- --- -- Procedure structure for `citycount2`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` PROCEDURE `citycount2`(IN country CHAR(3), OUT cities INT)- BEGIN- SELECT 1000 INTO cities;- END ;;- DELIMITER ;diff --git a/backend/plugin/schema/mysql/testdata/get-design-schema/procedure/delete-procedure.yaml b/backend/plugin/schema/mysql/testdata/get-design-schema/procedure/delete-procedure.yamldeleted file mode 100644index 318a44c21f..0000000000--- a/backend/plugin/schema/mysql/testdata/get-design-schema/procedure/delete-procedure.yaml+++ /dev/null@@ -1,148 +0,0 @@-- description: Delete all procedures in schema- target: |-- {- "name": "test_function",- "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,- "position": 1,- "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"- }- ]- }- ],- "collation": "utf8mb4_0900_ai_ci",- "characterSet": "utf8mb4"- }- result: |- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `id` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci;-- --- -- View structure for `v1`- --- CREATE OR REPLACE VIEW `v1` AS select `t`.`id` AS `id` from `t`;-- --- -- Function structure for `CalcIncome`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome`( starting_value INT ) RETURNS int(11)- DETERMINISTIC- BEGIN-- DECLARE income INT;-- SET income = 0;-- label1: WHILE income <= 3000 DO- SET income = income + starting_value;- END WHILE label1;-- RETURN income;-- END ;;- DELIMITER ;-- description: Delete all procedures in schema- target: |-- {- "name": "test_function",- "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,- "position": 1,- "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"- }- ]- }- ],- "collation": "utf8mb4_0900_ai_ci",- "characterSet": "utf8mb4"- }- result: |- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `id` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci;-- --- -- View structure for `v1`- --- CREATE OR REPLACE VIEW `v1` AS select `t`.`id` AS `id` from `t`;-- --- -- Function structure for `CalcIncome`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome`( starting_value INT ) RETURNS int(11)- DETERMINISTIC- BEGIN-- DECLARE income INT;-- SET income = 0;-- label1: WHILE income <= 3000 DO- SET income = income + starting_value;- END WHILE label1;-- RETURN income;-- END ;;- DELIMITER ;diff --git a/backend/plugin/schema/mysql/testdata/get-design-schema/procedure/modify-procedure.yaml b/backend/plugin/schema/mysql/testdata/get-design-schema/procedure/modify-procedure.yamldeleted file mode 100644index 8e5939ab6f..0000000000--- a/backend/plugin/schema/mysql/testdata/get-design-schema/procedure/modify-procedure.yaml+++ /dev/null@@ -1,104 +0,0 @@-- description: Modify procedure- target: |-- {- "name": "test_function",- "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,- "position": 1,- "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"- }- ],- "procedures": [- {- "name": "citycount",- "definition": "CREATE DEFINER=`root`@`%` PROCEDURE `citycount`(IN country CHAR(3), OUT cities INT)\nBEGIN\n SELECT 1000 INTO cities;\n END"- },- {- "name": "citycount2",- "definition": "CREATE DEFINER=`root`@`%` PROCEDURE `citycount2`(IN country CHAR(3), OUT cities INT)\nBEGIN\n SELECT 100000 INTO cities;\n END"- }- ]- }- ],- "collation": "utf8mb4_0900_ai_ci",- "characterSet": "utf8mb4"- }- result: |- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `id` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci;-- --- -- View structure for `v1`- --- CREATE OR REPLACE VIEW `v1` AS select `t`.`id` AS `id` from `t`;-- --- -- Function structure for `CalcIncome`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` FUNCTION `CalcIncome`( starting_value INT ) RETURNS int(11)- DETERMINISTIC- BEGIN-- DECLARE income INT;-- SET income = 0;-- label1: WHILE income <= 3000 DO- SET income = income + starting_value;- END WHILE label1;-- RETURN income;-- END ;;- DELIMITER ;-- --- -- Procedure structure for `citycount`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` PROCEDURE `citycount`(IN country CHAR(3), OUT cities INT)- BEGIN- SELECT 1000 INTO cities;- END ;;- DELIMITER ;-- --- -- Procedure structure for `citycount2`- --- DELIMITER ;;- CREATE DEFINER=`root`@`%` PROCEDURE `citycount2`(IN country CHAR(3), OUT cities INT)- BEGIN- SELECT 100000 INTO cities;- END ;;- DELIMITER ;diff --git a/backend/plugin/schema/mysql/testdata/get-design-schema/view/add-new-view.yaml b/backend/plugin/schema/mysql/testdata/get-design-schema/view/add-new-view.yamldeleted file mode 100644index fbf3b781cb..0000000000--- a/backend/plugin/schema/mysql/testdata/get-design-schema/view/add-new-view.yaml+++ /dev/null@@ -1,108 +0,0 @@-- description: Add new view in schema with view- target: |-- {- "name": "test_view",- "schemas": [- {- "views": [- {- "name": "v1",- "comment": "VIEW",- "definition": "select `t`.`id` AS `id` from `t`"- },- {- "name": "v2",- "comment": "VIEW",- "definition": "select (`t`.`id` + 1) AS `id + 1` from `t`"- }- ],- "tables": [- {- "name": "t",- "engine": "InnoDB",- "columns": [- {- "name": "id",- "type": "int",- "nullable": true,- "position": 1,- "defaultNull": true- }- ],- "dataSize": "16384",- "collation": "utf8mb4_0900_ai_ci"- }- ]- }- ],- "collation": "utf8mb4_0900_ai_ci",- "characterSet": "utf8mb4"- }- result: |- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `id` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci;-- --- -- View structure for `v1`- --- CREATE OR REPLACE VIEW `v1` AS select `t`.`id` AS `id` from `t`;-- --- -- View structure for `v2`- --- CREATE OR REPLACE VIEW `v2` AS select (`t`.`id` + 1) AS `id + 1` from `t`;-- description: Add new view in schema without views- target: |-- {- "schemas": [- {- "tables": [- {- "name": "t",- "engine": "InnoDB",- "columns": [- {- "name": "qty",- "type": "int",- "nullable": true,- "position": 1,- "defaultNull": true- },- {- "name": "price",- "type": "int",- "nullable": true,- "position": 2,- "defaultNull": true- }- ],- "collation": "utf8mb4_0900_ai_ci"- }- ],- "views": [- {- "name": "v",- "comment": "VIEW",- "definition": "select * from `test_view`.`t`"- }- ]- }- ]- }- result: |- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `qty` int DEFAULT NULL,- `price` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci;-- --- -- View structure for `v`- --- CREATE OR REPLACE VIEW `v` AS select * from `test_view`.`t`;diff --git a/backend/plugin/schema/mysql/testdata/get-design-schema/view/drop-view.yaml b/backend/plugin/schema/mysql/testdata/get-design-schema/view/drop-view.yamldeleted file mode 100644index 95a4ebe8fb..0000000000--- a/backend/plugin/schema/mysql/testdata/get-design-schema/view/drop-view.yaml+++ /dev/null@@ -1,82 +0,0 @@-- description: Drop view in schema with multiple views- target: |-- {- "name": "test_view",- "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,- "position": 1,- "defaultNull": true- }- ],- "dataSize": "16384",- "collation": "utf8mb4_0900_ai_ci"- }- ]- }- ],- "collation": "utf8mb4_0900_ai_ci",- "characterSet": "utf8mb4"- }- result: |- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `id` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci;-- --- -- View structure for `v1`- --- CREATE OR REPLACE VIEW `v1` AS select `t`.`id` AS `id` from `t`;-- description: Drop all views- target: |-- {- "name": "test_view",- "schemas": [- {- "tables": [- {- "name": "t",- "engine": "InnoDB",- "columns": [- {- "name": "id",- "type": "int",- "nullable": true,- "position": 1,- "defaultNull": true- }- ],- "dataSize": "16384",- "collation": "utf8mb4_0900_ai_ci"- }- ]- }- ],- "collation": "utf8mb4_0900_ai_ci",- "characterSet": "utf8mb4"- }- result: |- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `id` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci;diff --git a/backend/plugin/schema/mysql/testdata/get-design-schema/view/modify-view.yaml b/backend/plugin/schema/mysql/testdata/get-design-schema/view/modify-view.yamldeleted file mode 100644index efe4017ff8..0000000000--- a/backend/plugin/schema/mysql/testdata/get-design-schema/view/modify-view.yaml+++ /dev/null@@ -1,57 +0,0 @@-- description: Modify views- target: |-- {- "name": "test_view",- "schemas": [- {- "views": [- {- "name": "v1",- "comment": "VIEW",- "definition": "select `t`.`id` + 20 AS `id` from `t`"- },- {- "name": "v2",- "comment": "VIEW",- "definition": "select (`t`.`id` + 30) AS `id + 30` from `t`"- }- ],- "tables": [- {- "name": "t",- "engine": "InnoDB",- "columns": [- {- "name": "id",- "type": "int",- "nullable": true,- "position": 1,- "defaultNull": true- }- ],- "dataSize": "16384",- "collation": "utf8mb4_0900_ai_ci"- }- ]- }- ],- "collation": "utf8mb4_0900_ai_ci",- "characterSet": "utf8mb4"- }- result: |- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `id` int DEFAULT NULL- ) ENGINE=InnoDB COLLATE=utf8mb4_0900_ai_ci;-- --- -- View structure for `v1`- --- CREATE OR REPLACE VIEW `v1` AS select `t`.`id` + 20 AS `id` from `t`;-- --- -- View structure for `v2`- --- CREATE OR REPLACE VIEW `v2` AS select (`t`.`id` + 30) AS `id + 30` from `t`;diff --git a/backend/plugin/schema/oracle/testdata/get_design_schema.yaml b/backend/plugin/schema/oracle/testdata/get_design_schema.yamldeleted file mode 100644index aee0e6dfac..0000000000--- a/backend/plugin/schema/oracle/testdata/get_design_schema.yaml+++ /dev/null@@ -1,212 +0,0 @@-- baseline: |-- CREATE TABLE "BYTEBASE"."DEPARTMENTS" (- "DEPARTMENT_ID" NUMBER(10) VISIBLE NOT NULL,- "DEPARTMENT_NAME" VARCHAR2(100 BYTE) VISIBLE,- "DEPARTMENT_NAME_2" VARCHAR2(50 BYTE) VISIBLE,- CONSTRAINT "SYS_C006991" PRIMARY KEY ("DEPARTMENT_NAME"),- CONSTRAINT "SYS_C006993" UNIQUE ("DEPARTMENT_NAME") NOT DEFERRABLE INITIALLY IMMEDIATE VALIDATE- )- LOGGING- NOCOMPRESS- PCTFREE 10- INITRANS 1- STORAGE (- INITIAL 65536- )- NOCACHE- PARALLEL 1- DISABLE ROW MOVEMENT- ;-- CREATE TABLE "BYTEBASE"."DEPARTMENTS123" (- "DEPARTMENT_ID" NUMBER(3) VISIBLE NOT NULL,- "DEPARTMENT_NAME" VARCHAR2(50 BYTE) VISIBLE,- CONSTRAINT "SYS_C006991" PRIMARY KEY ("DEPARTMENT_ID"),- CONSTRAINT "SYS_C006992" UNIQUE ("DEPARTMENT_NAME") NOT DEFERRABLE INITIALLY IMMEDIATE VALIDATE- )- LOGGING- NOCOMPRESS- PCTFREE 10- INITRANS 1- STORAGE (- INITIAL 65536- )- NOCACHE- PARALLEL 1- DISABLE ROW MOVEMENT- ;- target: |-- {- "schemas": [- {- "name": "BYTEBASE",- "tables": [- {- "name": "DEPARTMENTS",- "columns": [- {- "name": "DEPARTMENT_ID",- "type": "NUMBER(3)"- },- {- "name": "DEPARTMENT_NAME",- "nullable": true,- "type": "VARCHAR2(50 BYTE)"- }- ],- "indexes": [- {- "name": "SYS_C006991",- "expressions": [- "DEPARTMENT_ID"- ],- "unique": true,- "primary": true,- "visible": true- },- {- "name": "SYS_C006992",- "expressions": [- "DEPARTMENT_NAME"- ],- "unique": true,- "visible": true- }- ]- },- {- "name": "EMPLOYEES",- "columns": [- {- "name": "EMPLOYEE_ID",- "type": "NUMBER(5)"- },- {- "name": "FIRST_NAME",- "nullable": true,- "type": "VARCHAR2(50 BYTE)"- },- {- "name": "LAST_NAME",- "nullable": true,- "type": "VARCHAR2(50 BYTE)"- },- {- "name": "JOB_TITLE",- "nullable": true,- "type": "VARCHAR2(100 BYTE)"- },- {- "name": "HIRE_DATE",- "nullable": true,- "type": "DATE"- },- {- "name": "SALARY",- "nullable": true,- "type": "NUMBER(10,2)"- },- {- "name": "DEPARTMENT_ID",- "nullable": true,- "type": "NUMBER(3)"- }- ],- "indexes": [- {- "name": "SYS_C006993",- "expressions": [- "EMPLOYEE_ID"- ],- "unique": true,- "primary": true,- "visible": true- },- {- "name": "IDX_EMPLOYEE_NAME_DEPARTMENT",- "expressions": [- "\"LAST_NAME\"",- "\"FIRST_NAME\"",- "\"DEPARTMENT_ID\""- ],- "visible": true- }- ]- },- {- "name": "SALARY",- "columns": [- {- "name": "EMPLOYEE_ID",- "type": "NUMBER(5)"- },- {- "name": "FIRST_NAME",- "nullable": true,- "type": "VARCHAR2(50 BYTE)"- },- {- "name": "LAST_NAME",- "nullable": true,- "type": "VARCHAR2(50 BYTE)"- },- {- "name": "SALARY_AMOUNT",- "nullable": true,- "type": "NUMBER(10,2)"- },- {- "name": "HIRE_DATE",- "nullable": true,- "type": "DATE"- }- ],- "indexes": [- {- "name": "SYS_C006995",- "expressions": [- "EMPLOYEE_ID"- ],- "unique": true,- "primary": true,- "visible": true- }- ]- }- ]- }- ]- }- result: |- CREATE TABLE "BYTEBASE"."DEPARTMENTS" (- "DEPARTMENT_ID" NUMBER(3) VISIBLE NOT NULL,- "DEPARTMENT_NAME" VARCHAR2(50 BYTE) VISIBLE,- CONSTRAINT "SYS_C006991" PRIMARY KEY ("DEPARTMENT_ID"),- CONSTRAINT "SYS_C006992" UNIQUE ("DEPARTMENT_NAME")- )- ;-- CREATE TABLE "BYTEBASE"."EMPLOYEES" (- "EMPLOYEE_ID" NUMBER(5) VISIBLE NOT NULL,- "FIRST_NAME" VARCHAR2(50 BYTE) VISIBLE,- "LAST_NAME" VARCHAR2(50 BYTE) VISIBLE,- "JOB_TITLE" VARCHAR2(100 BYTE) VISIBLE,- "HIRE_DATE" DATE VISIBLE,- "SALARY" NUMBER(10,2) VISIBLE,- "DEPARTMENT_ID" NUMBER(3) VISIBLE,- CONSTRAINT "SYS_C006993" PRIMARY KEY ("EMPLOYEE_ID")- )- ;-- CREATE INDEX "BYTEBASE"."IDX_EMPLOYEE_NAME_DEPARTMENT" ON "EMPLOYEES" ("LAST_NAME", "FIRST_NAME", "DEPARTMENT_ID")- ;-- CREATE TABLE "BYTEBASE"."SALARY" (- "EMPLOYEE_ID" NUMBER(5) VISIBLE NOT NULL,- "FIRST_NAME" VARCHAR2(50 BYTE) VISIBLE,- "LAST_NAME" VARCHAR2(50 BYTE) VISIBLE,- "SALARY_AMOUNT" NUMBER(10,2) VISIBLE,- "HIRE_DATE" DATE VISIBLE,- CONSTRAINT "SYS_C006995" PRIMARY KEY ("EMPLOYEE_ID")- )- ;diff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/array_types/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/array_types/ddl.sqldeleted file mode 100644index 444ec43328..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/array_types/ddl.sql+++ /dev/null@@ -1,29 +0,0 @@-CREATE SEQUENCE "public"."analytics_analysis_id_seq" START WITH 1 INCREMENT BY 1;-CREATE TABLE "public"."analytics" (- "analysis_id" integer NOT NULL DEFAULT nextval('public.analytics_analysis_id_seq'::regclass),- "data_points" _numeric NOT NULL,- "categories" _text NOT NULL,- "timestamps" _timestamptz NOT NULL,- "user_ids" _uuid,- "scores" _float4 DEFAULT ARRAY[]::REAL[],- "flags" _bool DEFAULT ARRAY[]::BOOLEAN[]-);-ALTER TABLE "public"."analytics" ADD CONSTRAINT "analytics_pkey" PRIMARY KEY (analysis_id);-CREATE INDEX idx_analytics_categories ON public.analytics USING gin (categories);--ALTER TABLE "public"."events" ADD COLUMN "capacities" _int4;-ALTER TABLE "public"."events" ADD COLUMN "locations" _text DEFAULT ARRAY[]::TEXT[] NOT NULL;-ALTER TABLE "public"."events" ADD COLUMN "metadata" _jsonb DEFAULT ARRAY[]::JSONB[];-ALTER TABLE "public"."events" ADD COLUMN "schedules" _timestamp;-ALTER TABLE "public"."events" ALTER COLUMN "event_dates" TYPE _timestamptz;-CREATE INDEX idx_events_locations ON public.events USING gin (locations);-CREATE INDEX idx_events_participants ON public.events USING gin (participant_ids);--ALTER TABLE "public"."products" ADD COLUMN "features" _jsonb;-ALTER TABLE "public"."products" ADD COLUMN "ratings" _int4 DEFAULT ARRAY[0,0,0,0,0];-ALTER TABLE "public"."products" ADD COLUMN "variants" _text;-ALTER TABLE "public"."products" ALTER COLUMN "category_ids" TYPE _int8;-ALTER TABLE "public"."products" ALTER COLUMN "tags" SET DEFAULT ARRAY[]::TEXT[];-CREATE INDEX idx_products_categories ON public.products USING gin (category_ids);-CREATE INDEX idx_products_tags ON public.products USING gin (tags);-diff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/array_types/diff.json b/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/array_types/diff.jsondeleted file mode 100644index 296cd48b08..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/array_types/diff.json+++ /dev/null@@ -1,218 +0,0 @@-{- "hasDifferences": true,- "summary": "Table changes: 3, Sequence changes: 1",- "tableChanges": 3,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 1,- "enumTypeChanges": 0,- "details": {- "tables": [- {- "action": "CREATE",- "schemaName": "public",- "tableName": "analytics",- "columnChanges": 0,- "indexChanges": 0,- "constraintChanges": 0,- "foreignKeyChanges": 0- },- {- "action": "ALTER",- "schemaName": "public",- "tableName": "events",- "columnChanges": 5,- "indexChanges": 2,- "constraintChanges": 0,- "foreignKeyChanges": 0,- "columns": [- {- "action": "CREATE",- "name": "capacities",- "newColumn": {- "name": "capacities",- "type": "_int4",- "nullable": true- }- },- {- "action": "ALTER",- "name": "event_dates",- "oldColumn": {- "name": "event_dates",- "type": "_timestamp",- "nullable": true- },- "newColumn": {- "name": "event_dates",- "type": "_timestamptz",- "nullable": true- }- },- {- "action": "CREATE",- "name": "locations",- "newColumn": {- "name": "locations",- "type": "_text",- "nullable": false,- "defaultValue": "ARRAY[]::TEXT[]"- }- },- {- "action": "CREATE",- "name": "metadata",- "newColumn": {- "name": "metadata",- "type": "_jsonb",- "nullable": true,- "defaultValue": "ARRAY[]::JSONB[]"- }- },- {- "action": "CREATE",- "name": "schedules",- "newColumn": {- "name": "schedules",- "type": "_timestamp",- "nullable": true- }- }- ],- "indexes": [- {- "action": "CREATE",- "name": "idx_events_locations",- "newIndex": {- "name": "idx_events_locations",- "type": "gin",- "unique": false,- "expressions": [- "locations"- ],- "descending": [- false- ]- }- },- {- "action": "CREATE",- "name": "idx_events_participants",- "newIndex": {- "name": "idx_events_participants",- "type": "gin",- "unique": false,- "expressions": [- "participant_ids"- ],- "descending": [- false- ]- }- }- ]- },- {- "action": "ALTER",- "schemaName": "public",- "tableName": "products",- "columnChanges": 5,- "indexChanges": 2,- "constraintChanges": 0,- "foreignKeyChanges": 0,- "columns": [- {- "action": "ALTER",- "name": "category_ids",- "oldColumn": {- "name": "category_ids",- "type": "_int4",- "nullable": true- },- "newColumn": {- "name": "category_ids",- "type": "_int8",- "nullable": true- }- },- {- "action": "CREATE",- "name": "features",- "newColumn": {- "name": "features",- "type": "_jsonb",- "nullable": true- }- },- {- "action": "CREATE",- "name": "ratings",- "newColumn": {- "name": "ratings",- "type": "_int4",- "nullable": true,- "defaultValue": "ARRAY[0,0,0,0,0]"- }- },- {- "action": "ALTER",- "name": "tags",- "oldColumn": {- "name": "tags",- "type": "_text",- "nullable": true- },- "newColumn": {- "name": "tags",- "type": "_text",- "nullable": true,- "defaultValue": "ARRAY[]::TEXT[]"- }- },- {- "action": "CREATE",- "name": "variants",- "newColumn": {- "name": "variants",- "type": "_text",- "nullable": true- }- }- ],- "indexes": [- {- "action": "CREATE",- "name": "idx_products_categories",- "newIndex": {- "name": "idx_products_categories",- "type": "gin",- "unique": false,- "expressions": [- "category_ids"- ],- "descending": [- false- ]- }- },- {- "action": "CREATE",- "name": "idx_products_tags",- "newIndex": {- "name": "idx_products_tags",- "type": "gin",- "unique": false,- "expressions": [- "tags"- ],- "descending": [- false- ]- }- }- ]- }- ]- }-}\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/array_types/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/array_types/expected_schema.sqldeleted file mode 100644index 5aa807353f..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/array_types/expected_schema.sql+++ /dev/null@@ -1,39 +0,0 @@--- Enhanced schema with comprehensive array type usage-CREATE TABLE public.products (- product_id SERIAL PRIMARY KEY,- name VARCHAR(200) NOT NULL,- tags TEXT[] DEFAULT ARRAY[]::TEXT[], -- Added default empty array- category_ids BIGINT[], -- Changed from INTEGER[] to BIGINT[]- prices NUMERIC(12,4)[], -- Increased precision- variants TEXT[][], -- New multidimensional array- ratings INTEGER[] DEFAULT ARRAY[0,0,0,0,0], -- New array with default values- features JSONB[] -- New JSONB array-);--CREATE TABLE public.events (- event_id SERIAL PRIMARY KEY,- title VARCHAR(200) NOT NULL,- participant_ids UUID[],- event_dates TIMESTAMP WITH TIME ZONE[], -- Added timezone- locations TEXT[] NOT NULL DEFAULT ARRAY[]::TEXT[], -- New required array with default- capacities INTEGER[], -- New integer array- schedules TIMESTAMP[][], -- New multidimensional timestamp array- metadata JSONB[] DEFAULT ARRAY[]::JSONB[] -- New JSONB array with default-);--CREATE TABLE public.analytics (- analysis_id SERIAL PRIMARY KEY,- data_points NUMERIC(15,6)[] NOT NULL,- categories TEXT[] NOT NULL,- timestamps TIMESTAMP WITH TIME ZONE[] NOT NULL,- user_ids UUID[],- scores REAL[] DEFAULT ARRAY[]::REAL[],- flags BOOLEAN[] DEFAULT ARRAY[]::BOOLEAN[]-);---- Add GIN indexes for array operations-CREATE INDEX idx_products_tags ON public.products USING GIN(tags);-CREATE INDEX idx_products_categories ON public.products USING GIN(category_ids);-CREATE INDEX idx_events_participants ON public.events USING GIN(participant_ids);-CREATE INDEX idx_events_locations ON public.events USING GIN(locations);-CREATE INDEX idx_analytics_categories ON public.analytics USING GIN(categories);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/array_types/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/array_types/initial_schema.sqldeleted file mode 100644index 3f09f3b429..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/array_types/initial_schema.sql+++ /dev/null@@ -1,15 +0,0 @@--- Initial schema with basic array types-CREATE TABLE public.products (- product_id SERIAL PRIMARY KEY,- name VARCHAR(200) NOT NULL,- tags TEXT[],- category_ids INTEGER[],- prices NUMERIC(10,2)[]-);--CREATE TABLE public.events (- event_id SERIAL PRIMARY KEY,- title VARCHAR(200) NOT NULL,- participant_ids UUID[],- event_dates TIMESTAMP[]-);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/array_types/test_description.md b/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/array_types/test_description.mddeleted file mode 100644index f6da75e513..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/array_types/test_description.md+++ /dev/null@@ -1,11 +0,0 @@-# Array Data Types Test--This test validates the SDL migration handling of PostgreSQL array types:-- **INTEGER[]**: Integer arrays-- **TEXT[]**: Text arrays-- **NUMERIC[]**: Numeric arrays-- **TIMESTAMP[]**: Timestamp arrays-- **UUID[]**: UUID arrays-- **Multidimensional arrays**: INTEGER[][], TEXT[][]--Tests creation, modification, and indexing of array columns with various constraints and default values.\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/binary_json_uuid/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/binary_json_uuid/ddl.sqldeleted file mode 100644index 06bc94918b..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/binary_json_uuid/ddl.sql+++ /dev/null@@ -1,25 +0,0 @@-ALTER TABLE "public"."documents" ADD COLUMN "checksum" bytea;-ALTER TABLE "public"."documents" ADD COLUMN "file_info" jsonb DEFAULT '{}';-ALTER TABLE "public"."documents" ADD COLUMN "updated_at" timestamp(6) without time zone;-ALTER TABLE "public"."documents" ALTER COLUMN "metadata" TYPE jsonb;-CREATE INDEX idx_documents_metadata ON public.documents USING gin (metadata);--CREATE TABLE "public"."files" (- "file_id" uuid NOT NULL DEFAULT gen_random_uuid(),- "filename" character varying(255) NOT NULL,- "content" bytea NOT NULL,- "mime_type" character varying(100),- "metadata" jsonb DEFAULT '{}',- "size_bytes" integer,- "upload_time" timestamp(6) without time zone DEFAULT CURRENT_TIMESTAMP-);-ALTER TABLE "public"."files" ADD CONSTRAINT "files_pkey" PRIMARY KEY (file_id);-CREATE INDEX idx_files_metadata ON public.files USING gin (metadata);-CREATE INDEX idx_files_mime_type ON public.files USING btree (mime_type);--ALTER TABLE "public"."sessions" ADD COLUMN "last_accessed" timestamp(6) without time zone DEFAULT CURRENT_TIMESTAMP;-ALTER TABLE "public"."sessions" ADD COLUMN "settings" jsonb DEFAULT '{"theme": "default"}'::jsonb;-ALTER TABLE "public"."sessions" ALTER COLUMN "session_id" SET DEFAULT gen_random_uuid();-CREATE INDEX idx_sessions_data ON public.sessions USING gin (data);-CREATE INDEX idx_sessions_settings ON public.sessions USING gin (settings);-diff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/binary_json_uuid/diff.json b/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/binary_json_uuid/diff.jsondeleted file mode 100644index 157d9e7342..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/binary_json_uuid/diff.json+++ /dev/null@@ -1,171 +0,0 @@-{- "hasDifferences": true,- "summary": "Table changes: 3",- "tableChanges": 3,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 0,- "enumTypeChanges": 0,- "details": {- "tables": [- {- "action": "ALTER",- "schemaName": "public",- "tableName": "documents",- "columnChanges": 4,- "indexChanges": 1,- "constraintChanges": 0,- "foreignKeyChanges": 0,- "columns": [- {- "action": "CREATE",- "name": "checksum",- "newColumn": {- "name": "checksum",- "type": "bytea",- "nullable": true- }- },- {- "action": "CREATE",- "name": "file_info",- "newColumn": {- "name": "file_info",- "type": "jsonb",- "nullable": true,- "defaultValue": "'{}'"- }- },- {- "action": "ALTER",- "name": "metadata",- "oldColumn": {- "name": "metadata",- "type": "json",- "nullable": true- },- "newColumn": {- "name": "metadata",- "type": "jsonb",- "nullable": true- }- },- {- "action": "CREATE",- "name": "updated_at",- "newColumn": {- "name": "updated_at",- "type": "timestamp(6) without time zone",- "nullable": true- }- }- ],- "indexes": [- {- "action": "CREATE",- "name": "idx_documents_metadata",- "newIndex": {- "name": "idx_documents_metadata",- "type": "gin",- "unique": false,- "expressions": [- "metadata"- ],- "descending": [- false- ]- }- }- ]- },- {- "action": "CREATE",- "schemaName": "public",- "tableName": "files",- "columnChanges": 0,- "indexChanges": 0,- "constraintChanges": 0,- "foreignKeyChanges": 0- },- {- "action": "ALTER",- "schemaName": "public",- "tableName": "sessions",- "columnChanges": 3,- "indexChanges": 2,- "constraintChanges": 0,- "foreignKeyChanges": 0,- "columns": [- {- "action": "CREATE",- "name": "last_accessed",- "newColumn": {- "name": "last_accessed",- "type": "timestamp(6) without time zone",- "nullable": true,- "defaultValue": "CURRENT_TIMESTAMP"- }- },- {- "action": "ALTER",- "name": "session_id",- "oldColumn": {- "name": "session_id",- "type": "uuid",- "nullable": false- },- "newColumn": {- "name": "session_id",- "type": "uuid",- "nullable": false,- "defaultValue": "gen_random_uuid()"- }- },- {- "action": "CREATE",- "name": "settings",- "newColumn": {- "name": "settings",- "type": "jsonb",- "nullable": true,- "defaultValue": "'{\"theme\": \"default\"}'::jsonb"- }- }- ],- "indexes": [- {- "action": "CREATE",- "name": "idx_sessions_data",- "newIndex": {- "name": "idx_sessions_data",- "type": "gin",- "unique": false,- "expressions": [- "data"- ],- "descending": [- false- ]- }- },- {- "action": "CREATE",- "name": "idx_sessions_settings",- "newIndex": {- "name": "idx_sessions_settings",- "type": "gin",- "unique": false,- "expressions": [- "settings"- ],- "descending": [- false- ]- }- }- ]- }- ]- }-}\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/binary_json_uuid/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/binary_json_uuid/expected_schema.sqldeleted file mode 100644index 7b8b800ebc..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/binary_json_uuid/expected_schema.sql+++ /dev/null@@ -1,37 +0,0 @@--- Enhanced schema with full advanced type usage-CREATE TABLE public.documents (- doc_id SERIAL PRIMARY KEY,- title VARCHAR(200) NOT NULL,- content BYTEA,- metadata JSONB, -- Changed from JSON to JSONB- checksum BYTEA, -- New binary column- file_info JSONB DEFAULT '{}', -- New JSONB with default- created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,- updated_at TIMESTAMP-);--CREATE TABLE public.sessions (- session_id UUID PRIMARY KEY DEFAULT gen_random_uuid(), -- Added default UUID generation- user_id INTEGER NOT NULL,- data JSONB,- settings JSONB DEFAULT '{"theme": "default"}'::jsonb, -- New JSONB with default- expires_at TIMESTAMP NOT NULL,- last_accessed TIMESTAMP DEFAULT CURRENT_TIMESTAMP -- New timestamp column-);--CREATE TABLE public.files (- file_id UUID PRIMARY KEY DEFAULT gen_random_uuid(),- filename VARCHAR(255) NOT NULL,- content BYTEA NOT NULL,- mime_type VARCHAR(100),- metadata JSONB DEFAULT '{}',- size_bytes INTEGER,- upload_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP-);---- Add indexes for JSON queries-CREATE INDEX idx_documents_metadata ON public.documents USING GIN(metadata);-CREATE INDEX idx_sessions_data ON public.sessions USING GIN(data);-CREATE INDEX idx_sessions_settings ON public.sessions USING GIN(settings);-CREATE INDEX idx_files_metadata ON public.files USING GIN(metadata);-CREATE INDEX idx_files_mime_type ON public.files(mime_type);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/binary_json_uuid/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/binary_json_uuid/initial_schema.sqldeleted file mode 100644index d376da1944..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/binary_json_uuid/initial_schema.sql+++ /dev/null@@ -1,15 +0,0 @@--- Initial schema with basic versions of advanced types-CREATE TABLE public.documents (- doc_id SERIAL PRIMARY KEY,- title VARCHAR(200) NOT NULL,- content BYTEA,- metadata JSON,- created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP-);--CREATE TABLE public.sessions (- session_id UUID PRIMARY KEY,- user_id INTEGER NOT NULL,- data JSONB,- expires_at TIMESTAMP NOT NULL-);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/binary_json_uuid/test_description.md b/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/binary_json_uuid/test_description.mddeleted file mode 100644index 59b8e72ec2..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/binary_json_uuid/test_description.md+++ /dev/null@@ -1,9 +0,0 @@-# Binary Data, JSON, and UUID Types Test--This test validates the SDL migration handling of advanced data types:-- **BYTEA**: Binary data storage and manipulation-- **JSON**: Standard JSON data type-- **JSONB**: Binary JSON with indexing capabilities-- **UUID**: Universal unique identifiers--Tests creation, modification, and indexing of these advanced data types along with their constraints and default values.\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/bit_range_types/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/bit_range_types/ddl.sqldeleted file mode 100644index 770907d80e..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/bit_range_types/ddl.sql+++ /dev/null@@ -1,44 +0,0 @@-CREATE SEQUENCE "public"."permissions_matrix_permission_id_seq" START WITH 1 INCREMENT BY 1;-CREATE SEQUENCE "public"."scheduling_schedule_id_seq" START WITH 1 INCREMENT BY 1;-ALTER TABLE "public"."bookings" ADD COLUMN "age_range" int4range;-ALTER TABLE "public"."bookings" ADD COLUMN "booking_dates" daterange NOT NULL;-ALTER TABLE "public"."bookings" ADD COLUMN "discount_range" numrange DEFAULT '[0,100)'::NUMRANGE;-ALTER TABLE "public"."bookings" ADD COLUMN "duration_range" int8range;-ALTER TABLE "public"."bookings" ADD COLUMN "valid_periods" _tstzrange;-ALTER TABLE "public"."bookings" ALTER COLUMN "booking_period" SET NOT NULL;-CREATE INDEX idx_bookings_dates ON public.bookings USING gist (booking_dates);-CREATE INDEX idx_bookings_period ON public.bookings USING gist (booking_period);-CREATE INDEX idx_bookings_price ON public.bookings USING gist (price_range);--CREATE TABLE "public"."permissions_matrix" (- "permission_id" integer NOT NULL DEFAULT nextval('public.permissions_matrix_permission_id_seq'::regclass),- "user_role" character varying(50) NOT NULL,- "read_permissions" bit(64) NOT NULL DEFAULT B'0000000000000000000000000000000000000000000000000000000000000000',- "write_permissions" bit(64) NOT NULL DEFAULT B'0000000000000000000000000000000000000000000000000000000000000000',- "admin_flags" bit(128) DEFAULT B'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',- "feature_access" bit(8) DEFAULT B'11111111'-);-ALTER TABLE "public"."permissions_matrix" ADD CONSTRAINT "permissions_matrix_pkey" PRIMARY KEY (permission_id);--CREATE TABLE "public"."scheduling" (- "schedule_id" integer NOT NULL DEFAULT nextval('public.scheduling_schedule_id_seq'::regclass),- "schedule_name" character varying(100) NOT NULL,- "working_hours" _tsrange NOT NULL DEFAULT ARRAY[]::TSRANGE[],- "available_dates" _daterange DEFAULT ARRAY[]::DATERANGE[],- "capacity_ranges" _int4range DEFAULT ARRAY[]::INT4RANGE[],- "budget_ranges" _numrange DEFAULT ARRAY[]::NUMRANGE[],- "holiday_periods" daterange NOT NULL DEFAULT '[2000-01-01,2000-01-02)'::DATERANGE-);-ALTER TABLE "public"."scheduling" ADD CONSTRAINT "scheduling_pkey" PRIMARY KEY (schedule_id);-CREATE INDEX idx_scheduling_hours ON public.scheduling USING gin (working_hours);-CREATE INDEX idx_scheduling_dates ON public.scheduling USING gin (available_dates);--ALTER TABLE "public"."system_flags" ADD COLUMN "access_mask" bit(64);-ALTER TABLE "public"."system_flags" ADD COLUMN "feature_flags" bit(32) DEFAULT B'00000000000000000000000000000000';-ALTER TABLE "public"."system_flags" ADD COLUMN "system_state" bit(128);-ALTER TABLE "public"."system_flags" ALTER COLUMN "bit_flags" TYPE bit(16);-ALTER TABLE "public"."system_flags" ALTER COLUMN "bit_flags" SET NOT NULL;-ALTER TABLE "public"."system_flags" ALTER COLUMN "bit_flags" SET DEFAULT B'0000000000000000';-ALTER TABLE "public"."system_flags" ALTER COLUMN "permissions" TYPE bit(32);-ALTER TABLE "public"."system_flags" ALTER COLUMN "permissions" SET DEFAULT B'00000000000000000000000000000000';-diff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/bit_range_types/diff.json b/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/bit_range_types/diff.jsondeleted file mode 100644index 6ef2bf12fe..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/bit_range_types/diff.json+++ /dev/null@@ -1,219 +0,0 @@-{- "hasDifferences": true,- "summary": "Table changes: 4, Sequence changes: 2",- "tableChanges": 4,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 2,- "enumTypeChanges": 0,- "details": {- "tables": [- {- "action": "ALTER",- "schemaName": "public",- "tableName": "bookings",- "columnChanges": 6,- "indexChanges": 3,- "constraintChanges": 0,- "foreignKeyChanges": 0,- "columns": [- {- "action": "CREATE",- "name": "age_range",- "newColumn": {- "name": "age_range",- "type": "int4range",- "nullable": true- }- },- {- "action": "CREATE",- "name": "booking_dates",- "newColumn": {- "name": "booking_dates",- "type": "daterange",- "nullable": false- }- },- {- "action": "ALTER",- "name": "booking_period",- "oldColumn": {- "name": "booking_period",- "type": "tsrange",- "nullable": true- },- "newColumn": {- "name": "booking_period",- "type": "tsrange",- "nullable": false- }- },- {- "action": "CREATE",- "name": "discount_range",- "newColumn": {- "name": "discount_range",- "type": "numrange",- "nullable": true,- "defaultValue": "'[0,100)'::NUMRANGE"- }- },- {- "action": "CREATE",- "name": "duration_range",- "newColumn": {- "name": "duration_range",- "type": "int8range",- "nullable": true- }- },- {- "action": "CREATE",- "name": "valid_periods",- "newColumn": {- "name": "valid_periods",- "type": "_tstzrange",- "nullable": true- }- }- ],- "indexes": [- {- "action": "CREATE",- "name": "idx_bookings_dates",- "newIndex": {- "name": "idx_bookings_dates",- "type": "gist",- "unique": false,- "expressions": [- "booking_dates"- ],- "descending": [- false- ]- }- },- {- "action": "CREATE",- "name": "idx_bookings_period",- "newIndex": {- "name": "idx_bookings_period",- "type": "gist",- "unique": false,- "expressions": [- "booking_period"- ],- "descending": [- false- ]- }- },- {- "action": "CREATE",- "name": "idx_bookings_price",- "newIndex": {- "name": "idx_bookings_price",- "type": "gist",- "unique": false,- "expressions": [- "price_range"- ],- "descending": [- false- ]- }- }- ]- },- {- "action": "CREATE",- "schemaName": "public",- "tableName": "permissions_matrix",- "columnChanges": 0,- "indexChanges": 0,- "constraintChanges": 0,- "foreignKeyChanges": 0- },- {- "action": "CREATE",- "schemaName": "public",- "tableName": "scheduling",- "columnChanges": 0,- "indexChanges": 0,- "constraintChanges": 0,- "foreignKeyChanges": 0- },- {- "action": "ALTER",- "schemaName": "public",- "tableName": "system_flags",- "columnChanges": 5,- "indexChanges": 0,- "constraintChanges": 0,- "foreignKeyChanges": 0,- "columns": [- {- "action": "CREATE",- "name": "access_mask",- "newColumn": {- "name": "access_mask",- "type": "bit(64)",- "nullable": true- }- },- {- "action": "ALTER",- "name": "bit_flags",- "oldColumn": {- "name": "bit_flags",- "type": "bit(8)",- "nullable": true- },- "newColumn": {- "name": "bit_flags",- "type": "bit(16)",- "nullable": false,- "defaultValue": "B'0000000000000000'"- }- },- {- "action": "CREATE",- "name": "feature_flags",- "newColumn": {- "name": "feature_flags",- "type": "bit(32)",- "nullable": true,- "defaultValue": "B'00000000000000000000000000000000'"- }- },- {- "action": "ALTER",- "name": "permissions",- "oldColumn": {- "name": "permissions",- "type": "bit(16)",- "nullable": true- },- "newColumn": {- "name": "permissions",- "type": "bit(32)",- "nullable": true,- "defaultValue": "B'00000000000000000000000000000000'"- }- },- {- "action": "CREATE",- "name": "system_state",- "newColumn": {- "name": "system_state",- "type": "bit(128)",- "nullable": true- }- }- ]- }- ]- }-}\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/bit_range_types/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/bit_range_types/expected_schema.sqldeleted file mode 100644index bbf171fdc2..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/bit_range_types/expected_schema.sql+++ /dev/null@@ -1,47 +0,0 @@--- Enhanced schema with comprehensive bit and range types-CREATE TABLE public.system_flags (- flag_id SERIAL PRIMARY KEY,- flag_name VARCHAR(50) NOT NULL,- bit_flags BIT(16) NOT NULL DEFAULT B'0000000000000000', -- Expanded from BIT(8)- permissions BIT(32) DEFAULT B'00000000000000000000000000000000', -- Expanded from BIT(16) to BIT(32)- feature_flags BIT(32) DEFAULT B'00000000000000000000000000000000', -- New bit column- access_mask BIT(64), -- New fixed bit column- system_state BIT(128) -- New fixed bit column-);--CREATE TABLE public.bookings (- booking_id SERIAL PRIMARY KEY,- booking_period TSRANGE NOT NULL, -- Keep as TSRANGE for compatibility- price_range NUMRANGE,- discount_range NUMRANGE DEFAULT '[0,100)'::NUMRANGE, -- New range with default- age_range INT4RANGE, -- New integer range- duration_range INT8RANGE, -- New bigint range- booking_dates DATERANGE NOT NULL, -- New date range- valid_periods TSTZRANGE[] -- Array of timestamp ranges-);--CREATE TABLE public.scheduling (- schedule_id SERIAL PRIMARY KEY,- schedule_name VARCHAR(100) NOT NULL,- working_hours TSRANGE[] NOT NULL DEFAULT ARRAY[]::TSRANGE[],- available_dates DATERANGE[] DEFAULT ARRAY[]::DATERANGE[],- capacity_ranges INT4RANGE[] DEFAULT ARRAY[]::INT4RANGE[],- budget_ranges NUMRANGE[] DEFAULT ARRAY[]::NUMRANGE[],- holiday_periods DATERANGE NOT NULL DEFAULT '[2000-01-01,2000-01-02)'::DATERANGE-);--CREATE TABLE public.permissions_matrix (- permission_id SERIAL PRIMARY KEY,- user_role VARCHAR(50) NOT NULL,- read_permissions BIT(64) NOT NULL DEFAULT B'0000000000000000000000000000000000000000000000000000000000000000',- write_permissions BIT(64) NOT NULL DEFAULT B'0000000000000000000000000000000000000000000000000000000000000000',- admin_flags BIT(128) DEFAULT B'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',- feature_access BIT(8) DEFAULT B'11111111'-);---- Add specialized indexes for range operations-CREATE INDEX idx_bookings_period ON public.bookings USING GIST(booking_period);-CREATE INDEX idx_bookings_price ON public.bookings USING GIST(price_range);-CREATE INDEX idx_bookings_dates ON public.bookings USING GIST(booking_dates);-CREATE INDEX idx_scheduling_hours ON public.scheduling USING GIN(working_hours);-CREATE INDEX idx_scheduling_dates ON public.scheduling USING GIN(available_dates);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/bit_range_types/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/bit_range_types/initial_schema.sqldeleted file mode 100644index 22e9799ab7..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/bit_range_types/initial_schema.sql+++ /dev/null@@ -1,13 +0,0 @@--- Initial schema with basic bit and range types-CREATE TABLE public.system_flags (- flag_id SERIAL PRIMARY KEY,- flag_name VARCHAR(50) NOT NULL,- bit_flags BIT(8),- permissions BIT(16)-);--CREATE TABLE public.bookings (- booking_id SERIAL PRIMARY KEY,- booking_period TSRANGE,- price_range NUMRANGE-);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/bit_range_types/test_description.md b/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/bit_range_types/test_description.mddeleted file mode 100644index 6a54da1675..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/bit_range_types/test_description.md+++ /dev/null@@ -1,17 +0,0 @@-# Bit and Range Data Types Test--This test validates the SDL migration handling of bit manipulation and range data types:--**Bit Types**:-- **BIT**: Fixed-length bit strings-- **BIT VARYING (VARBIT)**: Variable-length bit strings--**Range Types**:-- **INT4RANGE**: Integer ranges-- **INT8RANGE**: Bigint ranges-- **NUMRANGE**: Numeric ranges-- **TSRANGE**: Timestamp ranges-- **TSTZRANGE**: Timestamp with timezone ranges-- **DATERANGE**: Date ranges--Tests creation, constraints, indexing, and range operations for these specialized data types.\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/network_geometric/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/network_geometric/ddl.sqldeleted file mode 100644index 3cf22ab651..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/network_geometric/ddl.sql+++ /dev/null@@ -1,45 +0,0 @@-CREATE SEQUENCE "public"."geographic_features_feature_id_seq" START WITH 1 INCREMENT BY 1;-CREATE SEQUENCE "public"."network_topology_topology_id_seq" START WITH 1 INCREMENT BY 1;-CREATE TABLE "public"."geographic_features" (- "feature_id" integer NOT NULL DEFAULT nextval('public.geographic_features_feature_id_seq'::regclass),- "feature_name" character varying(200) NOT NULL,- "center_point" point NOT NULL,- "bounding_box" box NOT NULL,- "area_polygon" polygon,- "coverage_circle" circle,- "primary_line" lseg,- "reference_paths" _path,- "key_points" _point NOT NULL DEFAULT ARRAY[]::point[]-);-ALTER TABLE "public"."geographic_features" ADD CONSTRAINT "geographic_features_pkey" PRIMARY KEY (feature_id);-CREATE INDEX idx_features_center ON public.geographic_features USING gist (center_point);-CREATE INDEX idx_features_polygon ON public.geographic_features USING gist (area_polygon);--ALTER TABLE "public"."locations" ADD COLUMN "boundary_box" box;-ALTER TABLE "public"."locations" ADD COLUMN "center_point" point;-ALTER TABLE "public"."locations" ADD COLUMN "coverage_polygon" polygon;-ALTER TABLE "public"."locations" ADD COLUMN "route_path" path;-ALTER TABLE "public"."locations" ADD COLUMN "service_area" circle;-ALTER TABLE "public"."locations" ALTER COLUMN "coordinates" SET NOT NULL;-CREATE INDEX idx_locations_boundary ON public.locations USING gist (boundary_box);-CREATE INDEX idx_locations_coordinates ON public.locations USING gist (coordinates);--ALTER TABLE "public"."network_devices" ADD COLUMN "backup_mac" macaddr;-ALTER TABLE "public"."network_devices" ADD COLUMN "gateway" inet;-ALTER TABLE "public"."network_devices" ADD COLUMN "network_range" cidr;-ALTER TABLE "public"."network_devices" ADD COLUMN "subnet_mask" inet;-ALTER TABLE "public"."network_devices" ALTER COLUMN "ip_address" SET NOT NULL;-ALTER TABLE "public"."network_devices" ADD CONSTRAINT "network_devices_mac_address_key" UNIQUE (mac_address);--CREATE TABLE "public"."network_topology" (- "topology_id" integer NOT NULL DEFAULT nextval('public.network_topology_topology_id_seq'::regclass),- "network_name" character varying(100) NOT NULL,- "network_cidr" cidr NOT NULL,- "gateway_ip" inet NOT NULL,- "dns_servers" _inet DEFAULT ARRAY[]::inet[],- "device_macs" _macaddr DEFAULT ARRAY[]::macaddr[],- "subnet_ranges" _cidr-);-ALTER TABLE "public"."network_topology" ADD CONSTRAINT "network_topology_pkey" PRIMARY KEY (topology_id);-ALTER TABLE "public"."network_topology" ADD CONSTRAINT "network_topology_network_cidr_key" UNIQUE (network_cidr);-diff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/network_geometric/diff.json b/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/network_geometric/diff.jsondeleted file mode 100644index 03cc58f8a7..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/network_geometric/diff.json+++ /dev/null@@ -1,212 +0,0 @@-{- "hasDifferences": true,- "summary": "Table changes: 4, Sequence changes: 2",- "tableChanges": 4,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 2,- "enumTypeChanges": 0,- "details": {- "tables": [- {- "action": "CREATE",- "schemaName": "public",- "tableName": "geographic_features",- "columnChanges": 0,- "indexChanges": 0,- "constraintChanges": 0,- "foreignKeyChanges": 0- },- {- "action": "ALTER",- "schemaName": "public",- "tableName": "locations",- "columnChanges": 6,- "indexChanges": 2,- "constraintChanges": 0,- "foreignKeyChanges": 0,- "columns": [- {- "action": "CREATE",- "name": "boundary_box",- "newColumn": {- "name": "boundary_box",- "type": "box",- "nullable": true- }- },- {- "action": "CREATE",- "name": "center_point",- "newColumn": {- "name": "center_point",- "type": "point",- "nullable": true- }- },- {- "action": "ALTER",- "name": "coordinates",- "oldColumn": {- "name": "coordinates",- "type": "point",- "nullable": true- },- "newColumn": {- "name": "coordinates",- "type": "point",- "nullable": false- }- },- {- "action": "CREATE",- "name": "coverage_polygon",- "newColumn": {- "name": "coverage_polygon",- "type": "polygon",- "nullable": true- }- },- {- "action": "CREATE",- "name": "route_path",- "newColumn": {- "name": "route_path",- "type": "path",- "nullable": true- }- },- {- "action": "CREATE",- "name": "service_area",- "newColumn": {- "name": "service_area",- "type": "circle",- "nullable": true- }- }- ],- "indexes": [- {- "action": "CREATE",- "name": "idx_locations_boundary",- "newIndex": {- "name": "idx_locations_boundary",- "type": "gist",- "unique": false,- "expressions": [- "boundary_box"- ],- "descending": [- false- ]- }- },- {- "action": "CREATE",- "name": "idx_locations_coordinates",- "newIndex": {- "name": "idx_locations_coordinates",- "type": "gist",- "unique": false,- "expressions": [- "coordinates"- ],- "descending": [- false- ]- }- }- ]- },- {- "action": "ALTER",- "schemaName": "public",- "tableName": "network_devices",- "columnChanges": 5,- "indexChanges": 1,- "constraintChanges": 0,- "foreignKeyChanges": 0,- "columns": [- {- "action": "CREATE",- "name": "backup_mac",- "newColumn": {- "name": "backup_mac",- "type": "macaddr",- "nullable": true- }- },- {- "action": "CREATE",- "name": "gateway",- "newColumn": {- "name": "gateway",- "type": "inet",- "nullable": true- }- },- {- "action": "ALTER",- "name": "ip_address",- "oldColumn": {- "name": "ip_address",- "type": "inet",- "nullable": true- },- "newColumn": {- "name": "ip_address",- "type": "inet",- "nullable": false- }- },- {- "action": "CREATE",- "name": "network_range",- "newColumn": {- "name": "network_range",- "type": "cidr",- "nullable": true- }- },- {- "action": "CREATE",- "name": "subnet_mask",- "newColumn": {- "name": "subnet_mask",- "type": "inet",- "nullable": true- }- }- ],- "indexes": [- {- "action": "CREATE",- "name": "network_devices_mac_address_key",- "newIndex": {- "name": "network_devices_mac_address_key",- "type": "btree",- "unique": true,- "expressions": [- "mac_address"- ],- "descending": [- false- ]- }- }- ]- },- {- "action": "CREATE",- "schemaName": "public",- "tableName": "network_topology",- "columnChanges": 0,- "indexChanges": 0,- "constraintChanges": 0,- "foreignKeyChanges": 0- }- ]- }-}\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/network_geometric/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/network_geometric/expected_schema.sqldeleted file mode 100644index 236b88a9c8..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/network_geometric/expected_schema.sql+++ /dev/null@@ -1,50 +0,0 @@--- Enhanced schema with comprehensive network and geometric types-CREATE TABLE public.network_devices (- device_id SERIAL PRIMARY KEY,- device_name VARCHAR(100) NOT NULL,- ip_address INET NOT NULL, -- Made required- network_range CIDR, -- New network range column- mac_address MACADDR UNIQUE, -- Made unique- backup_mac MACADDR, -- New MAC address column- subnet_mask INET, -- New subnet information- gateway INET -- New gateway address-);--CREATE TABLE public.locations (- location_id SERIAL PRIMARY KEY,- name VARCHAR(100) NOT NULL,- coordinates POINT NOT NULL, -- Made required- center_point POINT, -- New point column- boundary_box BOX, -- New box geometric type- service_area CIRCLE, -- New circle type- coverage_polygon POLYGON, -- New polygon type- route_path PATH -- New path type-);--CREATE TABLE public.geographic_features (- feature_id SERIAL PRIMARY KEY,- feature_name VARCHAR(200) NOT NULL,- center_point POINT NOT NULL,- bounding_box BOX NOT NULL,- area_polygon POLYGON,- coverage_circle CIRCLE,- primary_line LSEG, -- Line segment- reference_paths PATH[], -- Array of paths- key_points POINT[] NOT NULL DEFAULT ARRAY[]::point[]-);--CREATE TABLE public.network_topology (- topology_id SERIAL PRIMARY KEY,- network_name VARCHAR(100) NOT NULL,- network_cidr CIDR NOT NULL UNIQUE,- gateway_ip INET NOT NULL,- dns_servers INET[] DEFAULT ARRAY[]::inet[],- device_macs MACADDR[] DEFAULT ARRAY[]::macaddr[],- subnet_ranges CIDR[]-);---- Add specialized indexes (GIST indexes for geometric types)-CREATE INDEX idx_locations_coordinates ON public.locations USING GIST(coordinates);-CREATE INDEX idx_locations_boundary ON public.locations USING GIST(boundary_box);-CREATE INDEX idx_features_center ON public.geographic_features USING GIST(center_point);-CREATE INDEX idx_features_polygon ON public.geographic_features USING GIST(area_polygon);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/network_geometric/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/network_geometric/initial_schema.sqldeleted file mode 100644index 87b9a72311..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/network_geometric/initial_schema.sql+++ /dev/null@@ -1,13 +0,0 @@--- Initial schema with basic network and geometric types-CREATE TABLE public.network_devices (- device_id SERIAL PRIMARY KEY,- device_name VARCHAR(100) NOT NULL,- ip_address INET,- mac_address MACADDR-);--CREATE TABLE public.locations (- location_id SERIAL PRIMARY KEY,- name VARCHAR(100) NOT NULL,- coordinates POINT-);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/network_geometric/test_description.md b/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/network_geometric/test_description.mddeleted file mode 100644index bc4428dda0..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/advanced_types/network_geometric/test_description.md+++ /dev/null@@ -1,19 +0,0 @@-# Network and Geometric Data Types Test--This test validates the SDL migration handling of specialized PostgreSQL data types:--**Network Address Types**:-- **INET**: IPv4 and IPv6 addresses with optional netmask-- **CIDR**: Network addresses-- **MACADDR**: MAC addresses--**Geometric Types**:-- **POINT**: Points in 2D space-- **LINE**: Infinite lines-- **LSEG**: Line segments-- **BOX**: Rectangular boxes-- **PATH**: Geometric paths-- **POLYGON**: Closed geometric paths-- **CIRCLE**: Circles--Tests creation, indexing, and constraints for these specialized data types.\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/alter_column_types/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/alter_column_types/ddl.sqldeleted file mode 100644index 1868f7dbc4..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/alter_column_types/ddl.sql+++ /dev/null@@ -1,9 +0,0 @@-ALTER TABLE "public"."users" ADD COLUMN "last_login" timestamp(6) without time zone;-ALTER TABLE "public"."users" ADD COLUMN "middle_name" character varying(50);-ALTER TABLE "public"."users" ALTER COLUMN "age" TYPE bigint;-ALTER TABLE "public"."users" ALTER COLUMN "balance" TYPE numeric(12,4);-ALTER TABLE "public"."users" ALTER COLUMN "balance" DROP DEFAULT;-ALTER TABLE "public"."users" ALTER COLUMN "balance" SET DEFAULT 0.0000;-ALTER TABLE "public"."users" ALTER COLUMN "email" SET NOT NULL;-ALTER TABLE "public"."users" ALTER COLUMN "username" TYPE character varying(100);-diff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/alter_column_types/diff.json b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/alter_column_types/diff.jsondeleted file mode 100644index b3ca9f6abe..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/alter_column_types/diff.json+++ /dev/null@@ -1,101 +0,0 @@-{- "hasDifferences": true,- "summary": "Table changes: 1",- "tableChanges": 1,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 0,- "enumTypeChanges": 0,- "details": {- "tables": [- {- "action": "ALTER",- "schemaName": "public",- "tableName": "users",- "columnChanges": 6,- "indexChanges": 0,- "constraintChanges": 0,- "foreignKeyChanges": 0,- "columns": [- {- "action": "ALTER",- "name": "age",- "oldColumn": {- "name": "age",- "type": "integer",- "nullable": true- },- "newColumn": {- "name": "age",- "type": "bigint",- "nullable": true- }- },- {- "action": "ALTER",- "name": "balance",- "oldColumn": {- "name": "balance",- "type": "numeric(10,2)",- "nullable": true,- "defaultValue": "0.00"- },- "newColumn": {- "name": "balance",- "type": "numeric(12,4)",- "nullable": true,- "defaultValue": "0.0000"- }- },- {- "action": "ALTER",- "name": "email",- "oldColumn": {- "name": "email",- "type": "character varying(100)",- "nullable": true- },- "newColumn": {- "name": "email",- "type": "character varying(100)",- "nullable": false- }- },- {- "action": "CREATE",- "name": "last_login",- "newColumn": {- "name": "last_login",- "type": "timestamp(6) without time zone",- "nullable": true- }- },- {- "action": "CREATE",- "name": "middle_name",- "newColumn": {- "name": "middle_name",- "type": "character varying(50)",- "nullable": true- }- },- {- "action": "ALTER",- "name": "username",- "oldColumn": {- "name": "username",- "type": "character varying(50)",- "nullable": false- },- "newColumn": {- "name": "username",- "type": "character varying(100)",- "nullable": false- }- }- ]- }- ]- }-}\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/alter_column_types/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/alter_column_types/expected_schema.sqldeleted file mode 100644index 8a7c36d9bd..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/alter_column_types/expected_schema.sql+++ /dev/null@@ -1,16 +0,0 @@--- Modified table with altered column types-CREATE TABLE public.users (- id SERIAL PRIMARY KEY, -- Keep SERIAL to avoid sequence dependency issues- username VARCHAR(100) NOT NULL, -- Expanded from VARCHAR(50) to VARCHAR(100)- email VARCHAR(100) NOT NULL, -- Changed from nullable to NOT NULL- age BIGINT, -- Changed from INTEGER to BIGINT- balance DECIMAL(12,4) DEFAULT 0.0000, -- Expanded precision from (10,2) to (12,4)- is_active BOOLEAN DEFAULT true,- created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,- last_login TIMESTAMP, -- New nullable column- middle_name VARCHAR(50) -- New nullable column-);---- Keep existing indexes-CREATE UNIQUE INDEX idx_users_username ON public.users(username);-CREATE INDEX idx_users_email ON public.users(email);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/alter_column_types/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/alter_column_types/initial_schema.sqldeleted file mode 100644index a3abaa083b..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/alter_column_types/initial_schema.sql+++ /dev/null@@ -1,14 +0,0 @@--- Initial table with basic column types-CREATE TABLE public.users (- id SERIAL PRIMARY KEY,- username VARCHAR(50) NOT NULL,- email VARCHAR(100),- age INTEGER,- balance DECIMAL(10,2) DEFAULT 0.00,- is_active BOOLEAN DEFAULT true,- created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP-);---- Sample data constraints-CREATE UNIQUE INDEX idx_users_username ON public.users(username);-CREATE INDEX idx_users_email ON public.users(email);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/alter_column_types/test_description.md b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/alter_column_types/test_description.mddeleted file mode 100644index c9d5910017..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/alter_column_types/test_description.md+++ /dev/null@@ -1,10 +0,0 @@-# ALTER Column Types Test--This test validates the SDL migration handling of column type alterations:-- Expanding varchar length (VARCHAR(50) → VARCHAR(100))-- Compatible type conversions (INTEGER → BIGINT)-- Adding nullable columns to existing tables-- Modifying column default values-- Changing column nullability constraints--Tests proper handling of data-preserving schema alterations and their DDL generation.\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/complex_alterations/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/complex_alterations/ddl.sqldeleted file mode 100644index 430d56baff..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/complex_alterations/ddl.sql+++ /dev/null@@ -1,26 +0,0 @@-ALTER TABLE "public"."orders" ADD COLUMN "customer_phone" character varying(20);-ALTER TABLE "public"."orders" ADD COLUMN "notes" text;-ALTER TABLE "public"."orders" ADD COLUMN "shipping_address" jsonb;-ALTER TABLE "public"."orders" ADD COLUMN "tax_amount" numeric(15,4) DEFAULT 0.0000;-ALTER TABLE "public"."orders" ALTER COLUMN "customer_email" TYPE character varying(150);-ALTER TABLE "public"."orders" ALTER COLUMN "order_date" TYPE timestamp(6) with time zone;-ALTER TABLE "public"."orders" ALTER COLUMN "order_date" DROP DEFAULT;-ALTER TABLE "public"."orders" ALTER COLUMN "order_date" SET DEFAULT CURRENT_TIMESTAMP;-ALTER TABLE "public"."orders" ALTER COLUMN "status" TYPE character varying(30);-ALTER TABLE "public"."orders" ALTER COLUMN "status" DROP DEFAULT;-ALTER TABLE "public"."orders" ALTER COLUMN "status" SET DEFAULT 'pending';-ALTER TABLE "public"."orders" ALTER COLUMN "total_amount" TYPE numeric(15,4);-CREATE INDEX idx_orders_status ON public.orders USING btree (status);--ALTER TABLE "public"."products" ADD COLUMN "dimensions" jsonb;-ALTER TABLE "public"."products" ADD COLUMN "tags" _text;-ALTER TABLE "public"."products" ADD COLUMN "updated_at" timestamp(6) with time zone;-ALTER TABLE "public"."products" ADD COLUMN "weight" numeric(6,3);-ALTER TABLE "public"."products" ALTER COLUMN "category_ids" TYPE _int8;-ALTER TABLE "public"."products" ALTER COLUMN "created_at" TYPE timestamp(6) with time zone;-ALTER TABLE "public"."products" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;-ALTER TABLE "public"."products" ALTER COLUMN "name" TYPE character varying(200);-ALTER TABLE "public"."products" ALTER COLUMN "price" TYPE numeric(12,4);-CREATE INDEX idx_products_tags ON public.products USING gin (tags);-CREATE INDEX idx_products_weight ON public.products USING btree (weight);-diff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/complex_alterations/diff.json b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/complex_alterations/diff.jsondeleted file mode 100644index 11f430539f..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/complex_alterations/diff.json+++ /dev/null@@ -1,275 +0,0 @@-{- "hasDifferences": true,- "summary": "Table changes: 2",- "tableChanges": 2,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 0,- "enumTypeChanges": 0,- "details": {- "tables": [- {- "action": "ALTER",- "schemaName": "public",- "tableName": "orders",- "columnChanges": 8,- "indexChanges": 1,- "constraintChanges": 0,- "foreignKeyChanges": 0,- "columns": [- {- "action": "ALTER",- "name": "customer_email",- "oldColumn": {- "name": "customer_email",- "type": "character varying(100)",- "nullable": false- },- "newColumn": {- "name": "customer_email",- "type": "character varying(150)",- "nullable": false- }- },- {- "action": "CREATE",- "name": "customer_phone",- "newColumn": {- "name": "customer_phone",- "type": "character varying(20)",- "nullable": true- }- },- {- "action": "CREATE",- "name": "notes",- "newColumn": {- "name": "notes",- "type": "text",- "nullable": true- }- },- {- "action": "ALTER",- "name": "order_date",- "oldColumn": {- "name": "order_date",- "type": "date",- "nullable": false,- "defaultValue": "CURRENT_DATE"- },- "newColumn": {- "name": "order_date",- "type": "timestamp(6) with time zone",- "nullable": false,- "defaultValue": "CURRENT_TIMESTAMP"- }- },- {- "action": "CREATE",- "name": "shipping_address",- "newColumn": {- "name": "shipping_address",- "type": "jsonb",- "nullable": true- }- },- {- "action": "ALTER",- "name": "status",- "oldColumn": {- "name": "status",- "type": "character varying(20)",- "nullable": true,- "defaultValue": "'pending'::character varying"- },- "newColumn": {- "name": "status",- "type": "character varying(30)",- "nullable": true,- "defaultValue": "'pending'"- }- },- {- "action": "CREATE",- "name": "tax_amount",- "newColumn": {- "name": "tax_amount",- "type": "numeric(15,4)",- "nullable": true,- "defaultValue": "0.0000"- }- },- {- "action": "ALTER",- "name": "total_amount",- "oldColumn": {- "name": "total_amount",- "type": "numeric(10,2)",- "nullable": true- },- "newColumn": {- "name": "total_amount",- "type": "numeric(15,4)",- "nullable": true- }- }- ],- "indexes": [- {- "action": "CREATE",- "name": "idx_orders_status",- "newIndex": {- "name": "idx_orders_status",- "type": "btree",- "unique": false,- "expressions": [- "status"- ],- "descending": [- false- ]- }- }- ]- },- {- "action": "ALTER",- "schemaName": "public",- "tableName": "products",- "columnChanges": 8,- "indexChanges": 2,- "constraintChanges": 0,- "foreignKeyChanges": 0,- "columns": [- {- "action": "ALTER",- "name": "category_ids",- "oldColumn": {- "name": "category_ids",- "type": "_int4",- "nullable": true- },- "newColumn": {- "name": "category_ids",- "type": "_int8",- "nullable": true- }- },- {- "action": "ALTER",- "name": "created_at",- "oldColumn": {- "name": "created_at",- "type": "timestamp(6) without time zone",- "nullable": true- },- "newColumn": {- "name": "created_at",- "type": "timestamp(6) with time zone",- "nullable": true,- "defaultValue": "CURRENT_TIMESTAMP"- }- },- {- "action": "CREATE",- "name": "dimensions",- "newColumn": {- "name": "dimensions",- "type": "jsonb",- "nullable": true- }- },- {- "action": "ALTER",- "name": "name",- "oldColumn": {- "name": "name",- "type": "character varying(100)",- "nullable": false- },- "newColumn": {- "name": "name",- "type": "character varying(200)",- "nullable": false- }- },- {- "action": "ALTER",- "name": "price",- "oldColumn": {- "name": "price",- "type": "numeric(8,2)",- "nullable": false- },- "newColumn": {- "name": "price",- "type": "numeric(12,4)",- "nullable": false- }- },- {- "action": "CREATE",- "name": "tags",- "newColumn": {- "name": "tags",- "type": "_text",- "nullable": true- }- },- {- "action": "CREATE",- "name": "updated_at",- "newColumn": {- "name": "updated_at",- "type": "timestamp(6) with time zone",- "nullable": true- }- },- {- "action": "CREATE",- "name": "weight",- "newColumn": {- "name": "weight",- "type": "numeric(6,3)",- "nullable": true- }- }- ],- "indexes": [- {- "action": "CREATE",- "name": "idx_products_tags",- "newIndex": {- "name": "idx_products_tags",- "type": "gin",- "unique": false,- "expressions": [- "tags"- ],- "descending": [- false- ]- }- },- {- "action": "CREATE",- "name": "idx_products_weight",- "newIndex": {- "name": "idx_products_weight",- "type": "btree",- "unique": false,- "expressions": [- "weight"- ],- "descending": [- false- ]- }- }- ]- }- ]- }-}\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/complex_alterations/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/complex_alterations/expected_schema.sqldeleted file mode 100644index 877bbbe450..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/complex_alterations/expected_schema.sql+++ /dev/null@@ -1,39 +0,0 @@--- Expected schema with complex alterations applied-CREATE TABLE public.products (- product_id SERIAL PRIMARY KEY, -- Keep SERIAL to avoid sequence issues- name VARCHAR(200) NOT NULL, -- Expanded from VARCHAR(100) to VARCHAR(200)- description TEXT,- price DECIMAL(12,4) NOT NULL, -- Expanded from DECIMAL(8,2) to DECIMAL(12,4)- category_ids BIGINT[], -- Changed from INTEGER[] to BIGINT[]- attributes JSONB,- created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP, -- Added timezone and default- updated_at TIMESTAMP WITH TIME ZONE, -- New column- is_featured BOOLEAN DEFAULT false,- weight DECIMAL(6,3), -- New column for product weight- dimensions JSONB, -- New column for product dimensions- tags TEXT[] -- New column for product tags-);--CREATE TABLE public.orders (- order_id BIGSERIAL PRIMARY KEY, -- Keep BIGSERIAL to avoid sequence issues- customer_email VARCHAR(150) NOT NULL, -- Expanded from VARCHAR(100)- customer_phone VARCHAR(20), -- New nullable column- order_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, -- Changed from DATE to TIMESTAMPTZ- total_amount NUMERIC(15,4), -- Expanded precision from NUMERIC(10,2)- tax_amount NUMERIC(15,4) DEFAULT 0.0000, -- New column- status VARCHAR(30) DEFAULT 'pending', -- Expanded from VARCHAR(20)- shipping_address JSONB, -- New column for shipping details- notes TEXT -- New column for order notes-);---- Keep existing indexes with potentially updated column types-CREATE INDEX idx_products_name ON public.products(name);-CREATE INDEX idx_products_price ON public.products(price);-CREATE INDEX idx_products_attributes ON public.products USING GIN(attributes);-CREATE INDEX idx_orders_customer ON public.orders(customer_email);-CREATE INDEX idx_orders_date ON public.orders(order_date);---- New indexes for new columns-CREATE INDEX idx_products_weight ON public.products(weight);-CREATE INDEX idx_products_tags ON public.products USING GIN(tags);-CREATE INDEX idx_orders_status ON public.orders(status);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/complex_alterations/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/complex_alterations/initial_schema.sqldeleted file mode 100644index b06e8311a6..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/complex_alterations/initial_schema.sql+++ /dev/null@@ -1,26 +0,0 @@--- Initial schema with various data types-CREATE TABLE public.products (- product_id SERIAL PRIMARY KEY,- name VARCHAR(100) NOT NULL,- description TEXT,- price DECIMAL(8,2) NOT NULL,- category_ids INTEGER[],- attributes JSONB,- created_at TIMESTAMP,- is_featured BOOLEAN DEFAULT false-);--CREATE TABLE public.orders (- order_id BIGSERIAL PRIMARY KEY,- customer_email VARCHAR(100) NOT NULL,- order_date DATE NOT NULL DEFAULT CURRENT_DATE,- total_amount NUMERIC(10,2),- status VARCHAR(20) DEFAULT 'pending'-);---- Indexes that may be affected by column changes-CREATE INDEX idx_products_name ON public.products(name);-CREATE INDEX idx_products_price ON public.products(price);-CREATE INDEX idx_products_attributes ON public.products USING GIN(attributes);-CREATE INDEX idx_orders_customer ON public.orders(customer_email);-CREATE INDEX idx_orders_date ON public.orders(order_date);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/complex_alterations/test_description.md b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/complex_alterations/test_description.mddeleted file mode 100644index 6acaeebe9d..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/complex_alterations/test_description.md+++ /dev/null@@ -1,10 +0,0 @@-# Complex Data Type Alterations Test--This test validates the SDL migration handling of complex column alterations:-- Multiple column type changes in a single table-- Adding new columns with constraints and defaults-- Modifying existing column constraints and defaults-- Handling array data types and JSONB modifications-- Date/time precision changes and timezone conversions--Tests comprehensive schema evolution scenarios that combine multiple alteration types.\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/datetime_types/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/datetime_types/ddl.sqldeleted file mode 100644index f500702efb..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/datetime_types/ddl.sql+++ /dev/null@@ -1,24 +0,0 @@-CREATE SEQUENCE "public"."datetime_types_test_id_seq" START WITH 1 INCREMENT BY 1;-CREATE TABLE "public"."datetime_types_test" (- "id" integer NOT NULL DEFAULT nextval('public.datetime_types_test_id_seq'::regclass),- "date_col" date DEFAULT CURRENT_DATE,- "date_birth" date NOT NULL,- "time_col" time(6) without time zone,- "time_with_tz" time(6) with time zone,- "time_precise" time(6) without time zone DEFAULT CURRENT_TIME,- "timestamp_col" timestamp(6) without time zone,- "timestamp_with_tz" timestamp(6) with time zone DEFAULT CURRENT_TIMESTAMP,- "timestamp_created" timestamp(6) without time zone DEFAULT NOW(),- "timestamp_precise" timestamp(3) without time zone NOT NULL,- "interval_col" interval,- "interval_default" interval DEFAULT '1 day',- CONSTRAINT "datetime_types_test_check_1" CHECK (date_birth <= CURRENT_DATE),- CONSTRAINT "datetime_types_test_check_2" CHECK (timestamp_precise >= '2020-01-01'::timestamp),- CONSTRAINT "datetime_types_test_check_3" CHECK (interval_col IS NULL OR interval_col >= '0 seconds'::interval)-);-ALTER TABLE "public"."datetime_types_test" ADD CONSTRAINT "datetime_types_test_pkey" PRIMARY KEY (id);-CREATE INDEX idx_datetime_date ON public.datetime_types_test USING btree (date_col);-CREATE INDEX idx_datetime_timestamp_tz ON public.datetime_types_test USING btree (timestamp_with_tz);-CREATE INDEX idx_datetime_created_desc ON public.datetime_types_test USING btree (timestamp_created DESC);-CREATE INDEX idx_datetime_birth_year ON public.datetime_types_test USING btree (EXTRACT(YEAR FROM date_birth));-diff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/datetime_types/diff.json b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/datetime_types/diff.jsondeleted file mode 100644index 118a282ac1..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/datetime_types/diff.json+++ /dev/null@@ -1,23 +0,0 @@-{- "hasDifferences": true,- "summary": "Table changes: 1, Sequence changes: 1",- "tableChanges": 1,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 1,- "enumTypeChanges": 0,- "details": {- "tables": [- {- "action": "CREATE",- "schemaName": "public",- "tableName": "datetime_types_test",- "columnChanges": 0,- "indexChanges": 0,- "constraintChanges": 0,- "foreignKeyChanges": 0- }- ]- }-}\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/datetime_types/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/datetime_types/expected_schema.sqldeleted file mode 100644index 8735d3bb85..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/datetime_types/expected_schema.sql+++ /dev/null@@ -1,34 +0,0 @@--- Test all PostgreSQL date and time data types-CREATE TABLE public.datetime_types_test (- id SERIAL PRIMARY KEY,-- -- Date types- date_col DATE DEFAULT CURRENT_DATE,- date_birth DATE NOT NULL,-- -- Time types- time_col TIME,- time_with_tz TIME WITH TIME ZONE,- time_precise TIME(6) DEFAULT CURRENT_TIME,-- -- Timestamp types- timestamp_col TIMESTAMP,- timestamp_with_tz TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,- timestamp_created TIMESTAMP DEFAULT NOW(),- timestamp_precise TIMESTAMP(3) NOT NULL,-- -- Interval type- interval_col INTERVAL,- interval_default INTERVAL DEFAULT '1 day',-- -- Constraints- CHECK (date_birth <= CURRENT_DATE),- CHECK (timestamp_precise >= '2020-01-01'::timestamp),- CHECK (interval_col IS NULL OR interval_col >= '0 seconds'::interval)-);---- Indexes on datetime columns-CREATE INDEX idx_datetime_date ON public.datetime_types_test(date_col);-CREATE INDEX idx_datetime_timestamp_tz ON public.datetime_types_test(timestamp_with_tz);-CREATE INDEX idx_datetime_created_desc ON public.datetime_types_test(timestamp_created DESC);-CREATE INDEX idx_datetime_birth_year ON public.datetime_types_test(EXTRACT(YEAR FROM date_birth));\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/datetime_types/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/datetime_types/initial_schema.sqldeleted file mode 100644index e576ba21f6..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/datetime_types/initial_schema.sql+++ /dev/null@@ -1 +0,0 @@--- Empty initial schema\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/datetime_types/test_description.md b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/datetime_types/test_description.mddeleted file mode 100644index 6c39d9d649..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/datetime_types/test_description.md+++ /dev/null@@ -1,9 +0,0 @@-# DateTime Data Types Test--This test validates the SDL migration handling of PostgreSQL date and time data types:-- DATE for date values-- TIME and TIME WITH TIME ZONE-- TIMESTAMP and TIMESTAMP WITH TIME ZONE (TIMESTAMPTZ)-- INTERVAL for time intervals--Tests creation with various defaults and constraints.\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/drop_columns_table/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/drop_columns_table/ddl.sqldeleted file mode 100644index a72bf0b822..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/drop_columns_table/ddl.sql+++ /dev/null@@ -1,8 +0,0 @@-DROP TABLE IF EXISTS "public"."temp_data";-DROP INDEX IF EXISTS "public"."idx_users_first_last";-DROP INDEX IF EXISTS "public"."idx_users_metadata";-ALTER TABLE "public"."users" DROP COLUMN IF EXISTS "first_name";-ALTER TABLE "public"."users" DROP COLUMN IF EXISTS "last_name";-ALTER TABLE "public"."users" DROP COLUMN IF EXISTS "metadata";-DROP SEQUENCE IF EXISTS "public"."temp_data_temp_id_seq";-diff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/drop_columns_table/diff.json b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/drop_columns_table/diff.jsondeleted file mode 100644index a50f21daae..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/drop_columns_table/diff.json+++ /dev/null@@ -1,95 +0,0 @@-{- "hasDifferences": true,- "summary": "Table changes: 2, Sequence changes: 1",- "tableChanges": 2,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 1,- "enumTypeChanges": 0,- "details": {- "tables": [- {- "action": "DROP",- "schemaName": "public",- "tableName": "temp_data",- "columnChanges": 0,- "indexChanges": 0,- "constraintChanges": 0,- "foreignKeyChanges": 0- },- {- "action": "ALTER",- "schemaName": "public",- "tableName": "users",- "columnChanges": 3,- "indexChanges": 2,- "constraintChanges": 0,- "foreignKeyChanges": 0,- "columns": [- {- "action": "DROP",- "name": "first_name",- "oldColumn": {- "name": "first_name",- "type": "character varying(50)",- "nullable": true- }- },- {- "action": "DROP",- "name": "last_name",- "oldColumn": {- "name": "last_name",- "type": "character varying(50)",- "nullable": true- }- },- {- "action": "DROP",- "name": "metadata",- "oldColumn": {- "name": "metadata",- "type": "jsonb",- "nullable": true- }- }- ],- "indexes": [- {- "action": "DROP",- "name": "idx_users_first_last",- "oldIndex": {- "name": "idx_users_first_last",- "type": "btree",- "unique": false,- "expressions": [- "first_name",- "last_name"- ],- "descending": [- false,- false- ]- }- },- {- "action": "DROP",- "name": "idx_users_metadata",- "oldIndex": {- "name": "idx_users_metadata",- "type": "gin",- "unique": false,- "expressions": [- "metadata"- ],- "descending": [- false- ]- }- }- ]- }- ]- }-}\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/drop_columns_table/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/drop_columns_table/expected_schema.sqldeleted file mode 100644index 1373cf0614..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/drop_columns_table/expected_schema.sql+++ /dev/null@@ -1,24 +0,0 @@--- Expected schema after dropping columns and table-CREATE TABLE public.users (- id SERIAL PRIMARY KEY,- username VARCHAR(50) NOT NULL UNIQUE,- email VARCHAR(100) NOT NULL,- -- first_name and last_name columns dropped- age INTEGER,- balance DECIMAL(10,2) DEFAULT 0.00,- is_active BOOLEAN DEFAULT true,- created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,- updated_at TIMESTAMP- -- metadata column dropped (along with its GIN index)-);--CREATE TABLE public.user_sessions (- session_id UUID PRIMARY KEY,- user_id INTEGER NOT NULL REFERENCES users(id),- session_data JSONB,- expires_at TIMESTAMP NOT NULL,- created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP-);---- temp_data table completely dropped--- All related indexes and sequences should be cleaned up automatically\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/drop_columns_table/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/drop_columns_table/initial_schema.sqldeleted file mode 100644index 6250af4662..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/drop_columns_table/initial_schema.sql+++ /dev/null@@ -1,36 +0,0 @@--- Initial schema with multiple tables and various data types-CREATE TABLE public.users (- id SERIAL PRIMARY KEY,- username VARCHAR(50) NOT NULL UNIQUE,- email VARCHAR(100) NOT NULL,- first_name VARCHAR(50),- last_name VARCHAR(50),- age INTEGER,- balance DECIMAL(10,2) DEFAULT 0.00,- is_active BOOLEAN DEFAULT true,- created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,- updated_at TIMESTAMP,- metadata JSONB-);--CREATE TABLE public.user_sessions (- session_id UUID PRIMARY KEY,- user_id INTEGER NOT NULL REFERENCES users(id),- session_data JSONB,- expires_at TIMESTAMP NOT NULL,- created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP-);---- Table that will be completely dropped-CREATE TABLE public.temp_data (- temp_id SERIAL PRIMARY KEY,- temp_value TEXT,- temp_number NUMERIC(15,5),- temp_date DATE,- temp_boolean BOOLEAN DEFAULT false-);---- Indexes on columns that will be dropped-CREATE INDEX idx_users_first_last ON public.users(first_name, last_name);-CREATE INDEX idx_users_metadata ON public.users USING GIN(metadata);-CREATE INDEX idx_temp_value ON public.temp_data(temp_value);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/drop_columns_table/test_description.md b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/drop_columns_table/test_description.mddeleted file mode 100644index 5de07ab562..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/drop_columns_table/test_description.md+++ /dev/null@@ -1,9 +0,0 @@-# DROP Columns and Table Test--This test validates the SDL migration handling of DROP operations:-- Dropping individual columns from existing tables-- Dropping entire tables with various data types-- Handling dependencies (indexes, constraints) when dropping columns-- Proper cleanup of sequences and related objects--Tests proper DDL generation for destructive schema operations and dependency management.\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/numeric_types/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/numeric_types/ddl.sqldeleted file mode 100644index c217894c0b..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/numeric_types/ddl.sql+++ /dev/null@@ -1,22 +0,0 @@-CREATE SEQUENCE "public"."numeric_types_test_big_serial_col_seq" START WITH 1 INCREMENT BY 1;-CREATE SEQUENCE "public"."numeric_types_test_id_seq" START WITH 1 INCREMENT BY 1;-CREATE TABLE "public"."numeric_types_test" (- "id" integer NOT NULL DEFAULT nextval('public.numeric_types_test_id_seq'::regclass),- "small_int_col" smallint NOT NULL,- "int_col" integer DEFAULT 0,- "big_int_col" bigint,- "decimal_col" numeric(10,2) NOT NULL,- "numeric_col" numeric(15,3),- "numeric_no_scale" numeric(8),- "real_col" real,- "double_col" double precision,- "big_serial_col" bigint NOT NULL DEFAULT nextval('public.numeric_types_test_big_serial_col_seq'::regclass),- CONSTRAINT "numeric_types_test_check_1" CHECK (small_int_col > 0),- CONSTRAINT "numeric_types_test_check_2" CHECK (decimal_col >= 0)-);-ALTER TABLE "public"."numeric_types_test" ADD CONSTRAINT "numeric_types_test_pkey" PRIMARY KEY (id);-ALTER TABLE "public"."numeric_types_test" ADD CONSTRAINT "numeric_types_test_int_col_big_int_col_key" UNIQUE (int_col, big_int_col);-CREATE INDEX idx_numeric_decimal ON public.numeric_types_test USING btree (decimal_col);-CREATE INDEX idx_numeric_big_int ON public.numeric_types_test USING btree (big_int_col) WHERE big_int_col IS NOT NULL;-CREATE INDEX idx_numeric_composite ON public.numeric_types_test USING btree (int_col, real_col);-diff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/numeric_types/diff.json b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/numeric_types/diff.jsondeleted file mode 100644index c1e2cecef4..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/numeric_types/diff.json+++ /dev/null@@ -1,23 +0,0 @@-{- "hasDifferences": true,- "summary": "Table changes: 1, Sequence changes: 2",- "tableChanges": 1,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 2,- "enumTypeChanges": 0,- "details": {- "tables": [- {- "action": "CREATE",- "schemaName": "public",- "tableName": "numeric_types_test",- "columnChanges": 0,- "indexChanges": 0,- "constraintChanges": 0,- "foreignKeyChanges": 0- }- ]- }-}\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/numeric_types/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/numeric_types/expected_schema.sqldeleted file mode 100644index 625abf9480..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/numeric_types/expected_schema.sql+++ /dev/null@@ -1,29 +0,0 @@--- Test all PostgreSQL numeric data types-CREATE TABLE public.numeric_types_test (- id SERIAL PRIMARY KEY,- small_int_col SMALLINT NOT NULL,- int_col INTEGER DEFAULT 0,- big_int_col BIGINT,-- -- Decimal with different precision and scale- decimal_col DECIMAL(10,2) NOT NULL,- numeric_col NUMERIC(15,3),- numeric_no_scale NUMERIC(8),-- -- Floating point types- real_col REAL,- double_col DOUBLE PRECISION,-- -- Auto-increment columns- big_serial_col BIGSERIAL NOT NULL,-- -- Constraints- CHECK (small_int_col > 0),- CHECK (decimal_col >= 0),- UNIQUE (int_col, big_int_col)-);---- Indexes on numeric columns-CREATE INDEX idx_numeric_decimal ON public.numeric_types_test(decimal_col);-CREATE INDEX idx_numeric_big_int ON public.numeric_types_test(big_int_col) WHERE big_int_col IS NOT NULL;-CREATE INDEX idx_numeric_composite ON public.numeric_types_test(int_col, real_col);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/numeric_types/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/numeric_types/initial_schema.sqldeleted file mode 100644index 797fecfd78..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/numeric_types/initial_schema.sql+++ /dev/null@@ -1 +0,0 @@--- Empty initial schema - start from scratch\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/numeric_types/test_description.md b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/numeric_types/test_description.mddeleted file mode 100644index 223a42eb74..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/numeric_types/test_description.md+++ /dev/null@@ -1,9 +0,0 @@-# Numeric Data Types Test--This test validates the SDL migration handling of all PostgreSQL numeric data types:-- SMALLINT, INTEGER, BIGINT-- DECIMAL, NUMERIC with various precision/scale-- REAL, DOUBLE PRECISION-- SERIAL, BIGSERIAL--Tests both creation and modification of numeric columns with different constraints.\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/simple_table/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/simple_table/ddl.sqldeleted file mode 100644index e4e0fbda5b..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/simple_table/ddl.sql+++ /dev/null@@ -1,9 +0,0 @@-CREATE SEQUENCE "public"."simple_test_id_seq" START WITH 1 INCREMENT BY 1;-CREATE TABLE "public"."simple_test" (- "id" integer NOT NULL DEFAULT nextval('public.simple_test_id_seq'::regclass),- "name" character varying(50) NOT NULL,- "age" integer,- "active" boolean DEFAULT true-);-ALTER TABLE "public"."simple_test" ADD CONSTRAINT "simple_test_pkey" PRIMARY KEY (id);-diff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/simple_table/diff.json b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/simple_table/diff.jsondeleted file mode 100644index f9d30c8a59..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/simple_table/diff.json+++ /dev/null@@ -1,23 +0,0 @@-{- "hasDifferences": true,- "summary": "Table changes: 1, Sequence changes: 1",- "tableChanges": 1,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 1,- "enumTypeChanges": 0,- "details": {- "tables": [- {- "action": "CREATE",- "schemaName": "public",- "tableName": "simple_test",- "columnChanges": 0,- "indexChanges": 0,- "constraintChanges": 0,- "foreignKeyChanges": 0- }- ]- }-}\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/simple_table/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/simple_table/expected_schema.sqldeleted file mode 100644index 729c370d45..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/simple_table/expected_schema.sql+++ /dev/null@@ -1,7 +0,0 @@--- Simple table with basic types-CREATE TABLE public.simple_test (- id SERIAL PRIMARY KEY,- name VARCHAR(50) NOT NULL,- age INTEGER,- active BOOLEAN DEFAULT true-);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/simple_table/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/simple_table/initial_schema.sqldeleted file mode 100644index e576ba21f6..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/simple_table/initial_schema.sql+++ /dev/null@@ -1 +0,0 @@--- Empty initial schema\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/simple_table/test_description.md b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/simple_table/test_description.mddeleted file mode 100644index 8dc0fe74cc..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/simple_table/test_description.md+++ /dev/null@@ -1,3 +0,0 @@-# Simple Table Test--Test basic table creation with simple column types to validate the SDL framework.\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/string_types/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/string_types/ddl.sqldeleted file mode 100644index 59dd3c2d06..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/string_types/ddl.sql+++ /dev/null@@ -1,18 +0,0 @@-CREATE SEQUENCE "public"."string_types_test_id_seq" START WITH 1 INCREMENT BY 1;-CREATE TABLE "public"."string_types_test" (- "id" integer NOT NULL DEFAULT nextval('public.string_types_test_id_seq'::regclass),- "char_col" character(10),- "char_default" character(1) DEFAULT 'A',- "varchar_short" character varying(50) NOT NULL,- "varchar_long" character varying(500),- "varchar_no_limit" character varying,- "text_col" text,- "text_with_default" text DEFAULT 'default text',- CONSTRAINT "string_types_test_check_1" CHECK (LENGTH(text_col) > 0 OR text_col IS NULL)-);-ALTER TABLE "public"."string_types_test" ADD CONSTRAINT "string_types_test_pkey" PRIMARY KEY (id);-ALTER TABLE "public"."string_types_test" ADD CONSTRAINT "string_types_test_varchar_short_key" UNIQUE (varchar_short);-CREATE INDEX idx_string_varchar_short ON public.string_types_test USING btree (varchar_short);-CREATE INDEX idx_string_text_prefix ON public.string_types_test USING btree (LEFT(text_col, 50)) WHERE text_col IS NOT NULL;-CREATE INDEX idx_string_char_col ON public.string_types_test USING btree (char_col) WHERE char_col IS NOT NULL;-diff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/string_types/diff.json b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/string_types/diff.jsondeleted file mode 100644index c099e85d32..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/string_types/diff.json+++ /dev/null@@ -1,23 +0,0 @@-{- "hasDifferences": true,- "summary": "Table changes: 1, Sequence changes: 1",- "tableChanges": 1,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 1,- "enumTypeChanges": 0,- "details": {- "tables": [- {- "action": "CREATE",- "schemaName": "public",- "tableName": "string_types_test",- "columnChanges": 0,- "indexChanges": 0,- "constraintChanges": 0,- "foreignKeyChanges": 0- }- ]- }-}\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/string_types/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/string_types/expected_schema.sqldeleted file mode 100644index c1b0f192a2..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/string_types/expected_schema.sql+++ /dev/null@@ -1,32 +0,0 @@--- Expanded table with comprehensive string types-CREATE TABLE public.basic_strings (- id SERIAL PRIMARY KEY,- short_name VARCHAR(20) NOT NULL,- description TEXT-);--CREATE TABLE public.string_types_test (- id SERIAL PRIMARY KEY,-- -- Fixed length character types- char_col CHAR(10),- char_default CHAR(1) DEFAULT 'A',-- -- Variable length character types- varchar_short VARCHAR(50) NOT NULL,- varchar_long VARCHAR(500),- varchar_no_limit VARCHAR,-- -- Unlimited text- text_col TEXT,- text_with_default TEXT DEFAULT 'default text',-- -- Constraints and indexes- UNIQUE (varchar_short),- CHECK (LENGTH(text_col) > 0 OR text_col IS NULL)-);---- Create indexes on string columns-CREATE INDEX idx_string_varchar_short ON public.string_types_test(varchar_short);-CREATE INDEX idx_string_text_prefix ON public.string_types_test(LEFT(text_col, 50)) WHERE text_col IS NOT NULL;-CREATE INDEX idx_string_char_col ON public.string_types_test(char_col) WHERE char_col IS NOT NULL;\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/string_types/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/string_types/initial_schema.sqldeleted file mode 100644index 787b69830c..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/string_types/initial_schema.sql+++ /dev/null@@ -1,6 +0,0 @@--- Basic table with some string types-CREATE TABLE public.basic_strings (- id SERIAL PRIMARY KEY,- short_name VARCHAR(20) NOT NULL,- description TEXT-);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/string_types/test_description.md b/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/string_types/test_description.mddeleted file mode 100644index 9efbe32115..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/basic_types/string_types/test_description.md+++ /dev/null@@ -1,8 +0,0 @@-# String Data Types Test--This test validates the SDL migration handling of PostgreSQL string data types:-- CHAR, VARCHAR with different lengths-- TEXT and unlimited text-- CITEXT for case-insensitive text--Tests both creation and modification of string columns with length changes.\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/compatible_conversions/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/compatible_conversions/ddl.sqldeleted file mode 100644index 6131c54add..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/compatible_conversions/ddl.sql+++ /dev/null@@ -1,32 +0,0 @@-CREATE SEQUENCE "public"."analytics_record_id_seq" START WITH 1 INCREMENT BY 1;-CREATE TABLE "public"."analytics" (- "record_id" bigint NOT NULL DEFAULT nextval('public.analytics_record_id_seq'::regclass),- "metric_name" character varying(200) NOT NULL,- "value_small" bigint,- "value_int" numeric(20,6),- "description" text,- "measured_at" timestamp(6) with time zone DEFAULT CURRENT_TIMESTAMP,- "precision_value" double precision-);-ALTER TABLE "public"."analytics" ADD CONSTRAINT "analytics_pkey" PRIMARY KEY (record_id);--ALTER TABLE "public"."customers" ALTER COLUMN "credit_limit" TYPE numeric(12,4);-ALTER TABLE "public"."customers" ALTER COLUMN "credit_limit" DROP DEFAULT;-ALTER TABLE "public"."customers" ALTER COLUMN "credit_limit" SET DEFAULT 1000.0000;-ALTER TABLE "public"."customers" ALTER COLUMN "customer_id" TYPE bigint;-ALTER TABLE "public"."customers" ALTER COLUMN "email" TYPE text;-ALTER TABLE "public"."customers" ALTER COLUMN "last_login" TYPE timestamp(6) with time zone;-ALTER TABLE "public"."customers" ALTER COLUMN "signup_date" TYPE timestamp(6) with time zone;-ALTER TABLE "public"."customers" ALTER COLUMN "username" TYPE character varying(50);--ALTER TABLE "public"."products" ALTER COLUMN "created_date" TYPE timestamp(6) without time zone;-ALTER TABLE "public"."products" ALTER COLUMN "created_date" DROP DEFAULT;-ALTER TABLE "public"."products" ALTER COLUMN "created_date" SET DEFAULT CURRENT_TIMESTAMP;-ALTER TABLE "public"."products" ALTER COLUMN "description" TYPE text;-ALTER TABLE "public"."products" ALTER COLUMN "name" TYPE character varying(100);-ALTER TABLE "public"."products" ALTER COLUMN "price" TYPE double precision;-ALTER TABLE "public"."products" ALTER COLUMN "product_id" TYPE bigint;-ALTER TABLE "public"."products" ALTER COLUMN "quantity" TYPE bigint;-ALTER TABLE "public"."products" ALTER COLUMN "rating" TYPE numeric(5,2);-ALTER TABLE "public"."products" ALTER COLUMN "updated_time" TYPE time(6) with time zone;-diff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/compatible_conversions/diff.json b/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/compatible_conversions/diff.jsondeleted file mode 100644index 0ed31b3b54..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/compatible_conversions/diff.json+++ /dev/null@@ -1,249 +0,0 @@-{- "hasDifferences": true,- "summary": "Table changes: 3, Sequence changes: 1",- "tableChanges": 3,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 1,- "enumTypeChanges": 0,- "details": {- "tables": [- {- "action": "CREATE",- "schemaName": "public",- "tableName": "analytics",- "columnChanges": 0,- "indexChanges": 0,- "constraintChanges": 0,- "foreignKeyChanges": 0- },- {- "action": "ALTER",- "schemaName": "public",- "tableName": "customers",- "columnChanges": 6,- "indexChanges": 0,- "constraintChanges": 0,- "foreignKeyChanges": 0,- "columns": [- {- "action": "ALTER",- "name": "credit_limit",- "oldColumn": {- "name": "credit_limit",- "type": "numeric(8,2)",- "nullable": true,- "defaultValue": "1000.00"- },- "newColumn": {- "name": "credit_limit",- "type": "numeric(12,4)",- "nullable": true,- "defaultValue": "1000.0000"- }- },- {- "action": "ALTER",- "name": "customer_id",- "oldColumn": {- "name": "customer_id",- "type": "integer",- "nullable": false- },- "newColumn": {- "name": "customer_id",- "type": "bigint",- "nullable": false- }- },- {- "action": "ALTER",- "name": "email",- "oldColumn": {- "name": "email",- "type": "character varying(100)",- "nullable": false- },- "newColumn": {- "name": "email",- "type": "text",- "nullable": false- }- },- {- "action": "ALTER",- "name": "last_login",- "oldColumn": {- "name": "last_login",- "type": "timestamp(6) without time zone",- "nullable": true- },- "newColumn": {- "name": "last_login",- "type": "timestamp(6) with time zone",- "nullable": true- }- },- {- "action": "ALTER",- "name": "signup_date",- "oldColumn": {- "name": "signup_date",- "type": "date",- "nullable": false- },- "newColumn": {- "name": "signup_date",- "type": "timestamp(6) with time zone",- "nullable": false- }- },- {- "action": "ALTER",- "name": "username",- "oldColumn": {- "name": "username",- "type": "character varying(30)",- "nullable": false- },- "newColumn": {- "name": "username",- "type": "character varying(50)",- "nullable": false- }- }- ]- },- {- "action": "ALTER",- "schemaName": "public",- "tableName": "products",- "columnChanges": 8,- "indexChanges": 0,- "constraintChanges": 0,- "foreignKeyChanges": 0,- "columns": [- {- "action": "ALTER",- "name": "created_date",- "oldColumn": {- "name": "created_date",- "type": "date",- "nullable": true,- "defaultValue": "CURRENT_DATE"- },- "newColumn": {- "name": "created_date",- "type": "timestamp(6) without time zone",- "nullable": true,- "defaultValue": "CURRENT_TIMESTAMP"- }- },- {- "action": "ALTER",- "name": "description",- "oldColumn": {- "name": "description",- "type": "character varying(200)",- "nullable": true- },- "newColumn": {- "name": "description",- "type": "text",- "nullable": true- }- },- {- "action": "ALTER",- "name": "name",- "oldColumn": {- "name": "name",- "type": "character(50)",- "nullable": false- },- "newColumn": {- "name": "name",- "type": "character varying(100)",- "nullable": false- }- },- {- "action": "ALTER",- "name": "price",- "oldColumn": {- "name": "price",- "type": "real",- "nullable": false- },- "newColumn": {- "name": "price",- "type": "double precision",- "nullable": false- }- },- {- "action": "ALTER",- "name": "product_id",- "oldColumn": {- "name": "product_id",- "type": "smallint",- "nullable": false- },- "newColumn": {- "name": "product_id",- "type": "bigint",- "nullable": false- }- },- {- "action": "ALTER",- "name": "quantity",- "oldColumn": {- "name": "quantity",- "type": "integer",- "nullable": true,- "defaultValue": "0"- },- "newColumn": {- "name": "quantity",- "type": "bigint",- "nullable": true,- "defaultValue": "0"- }- },- {- "action": "ALTER",- "name": "rating",- "oldColumn": {- "name": "rating",- "type": "numeric(3,1)",- "nullable": true- },- "newColumn": {- "name": "rating",- "type": "numeric(5,2)",- "nullable": true- }- },- {- "action": "ALTER",- "name": "updated_time",- "oldColumn": {- "name": "updated_time",- "type": "time(6) without time zone",- "nullable": true,- "defaultValue": "CURRENT_TIME"- },- "newColumn": {- "name": "updated_time",- "type": "time(6) with time zone",- "nullable": true,- "defaultValue": "CURRENT_TIME"- }- }- ]- }- ]- }-}\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/compatible_conversions/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/compatible_conversions/expected_schema.sqldeleted file mode 100644index e65d80f45c..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/compatible_conversions/expected_schema.sql+++ /dev/null@@ -1,30 +0,0 @@--- Enhanced schema with compatible type promotions-CREATE TABLE public.products (- product_id BIGINT PRIMARY KEY, -- SMALLINT → BIGINT- name VARCHAR(100) NOT NULL, -- CHAR(50) → VARCHAR(100)- description TEXT, -- VARCHAR(200) → TEXT- price DOUBLE PRECISION NOT NULL, -- REAL → DOUBLE PRECISION- quantity BIGINT DEFAULT 0, -- INTEGER → BIGINT- rating NUMERIC(5,2), -- NUMERIC(3,1) → NUMERIC(5,2) expanded precision- created_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, -- DATE → TIMESTAMP- updated_time TIME WITH TIME ZONE DEFAULT CURRENT_TIME -- TIME → TIME WITH TIME ZONE-);--CREATE TABLE public.customers (- customer_id BIGINT PRIMARY KEY, -- INTEGER → BIGINT- username VARCHAR(50) UNIQUE NOT NULL, -- VARCHAR(30) → VARCHAR(50)- email TEXT NOT NULL, -- VARCHAR(100) → TEXT- credit_limit NUMERIC(12,4) DEFAULT 1000.0000, -- NUMERIC(8,2) → NUMERIC(12,4)- signup_date TIMESTAMP WITH TIME ZONE NOT NULL, -- DATE → TIMESTAMP WITH TIME ZONE- last_login TIMESTAMP WITH TIME ZONE -- TIMESTAMP → TIMESTAMP WITH TIME ZONE-);--CREATE TABLE public.analytics (- record_id BIGSERIAL PRIMARY KEY,- metric_name VARCHAR(200) NOT NULL,- value_small BIGINT, -- For SMALLINT → BIGINT conversion- value_int NUMERIC(20,6), -- For INTEGER → NUMERIC conversion- description TEXT, -- For various string → TEXT conversions- measured_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,- precision_value DOUBLE PRECISION -- For REAL → DOUBLE PRECISION-);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/compatible_conversions/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/compatible_conversions/initial_schema.sqldeleted file mode 100644index c0d0ef2713..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/compatible_conversions/initial_schema.sql+++ /dev/null@@ -1,20 +0,0 @@--- Initial schema with types that can be safely converted-CREATE TABLE public.products (- product_id SMALLINT PRIMARY KEY,- name CHAR(50) NOT NULL,- description VARCHAR(200),- price REAL NOT NULL,- quantity INTEGER DEFAULT 0,- rating NUMERIC(3,1),- created_date DATE DEFAULT CURRENT_DATE,- updated_time TIME DEFAULT CURRENT_TIME-);--CREATE TABLE public.customers (- customer_id INTEGER PRIMARY KEY,- username VARCHAR(30) UNIQUE NOT NULL,- email VARCHAR(100) NOT NULL,- credit_limit NUMERIC(8,2) DEFAULT 1000.00,- signup_date DATE NOT NULL,- last_login TIMESTAMP-);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/compatible_conversions/test_description.md b/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/compatible_conversions/test_description.mddeleted file mode 100644index 7129415226..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/compatible_conversions/test_description.md+++ /dev/null@@ -1,22 +0,0 @@-# Compatible Data Type Conversions Test--This test validates the SDL migration handling of safe, compatible data type conversions:--**Numeric Type Promotions**:-- SMALLINT → INTEGER → BIGINT-- INTEGER → NUMERIC/DECIMAL-- REAL → DOUBLE PRECISION-- NUMERIC precision expansion--**String Type Extensions**:-- CHAR(n) → VARCHAR(m) where m >= n-- VARCHAR(n) → VARCHAR(m) where m > n-- VARCHAR(n) → TEXT-- TEXT → CITEXT--**Temporal Type Enhancements**:-- DATE → TIMESTAMP-- TIMESTAMP → TIMESTAMP WITH TIME ZONE-- TIME → TIME WITH TIME ZONE--Tests data-preserving conversions that should execute without data loss.\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/incompatible_conversions/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/incompatible_conversions/ddl.sqldeleted file mode 100644index ad594b7121..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/incompatible_conversions/ddl.sql+++ /dev/null@@ -1,15 +0,0 @@-ALTER TABLE "public"."data_conflicts" ALTER COLUMN "default_change" DROP DEFAULT;-ALTER TABLE "public"."data_conflicts" ALTER COLUMN "default_change" SET DEFAULT 999;-ALTER TABLE "public"."data_conflicts" ALTER COLUMN "nullable_required" SET NOT NULL;-ALTER TABLE "public"."data_conflicts" ALTER COLUMN "type_change" TYPE integer USING "type_change"::integer;-ALTER TABLE "public"."data_conflicts" ALTER COLUMN "wide_varchar" TYPE character varying(10) USING "wide_varchar"::character varying(10);-ALTER TABLE "public"."data_conflicts" ADD CONSTRAINT "data_conflicts_unique_field_key" UNIQUE (unique_field);--ALTER TABLE "public"."risky_conversions" ALTER COLUMN "array_field" TYPE text;-ALTER TABLE "public"."risky_conversions" ALTER COLUMN "high_precision" TYPE real USING "high_precision"::real;-ALTER TABLE "public"."risky_conversions" ALTER COLUMN "json_field" TYPE text USING "json_field"::text;-ALTER TABLE "public"."risky_conversions" ALTER COLUMN "large_int" TYPE smallint USING "large_int"::smallint;-ALTER TABLE "public"."risky_conversions" ALTER COLUMN "numeric_text" TYPE integer USING "numeric_text"::integer;-ALTER TABLE "public"."risky_conversions" ALTER COLUMN "text_to_numeric" TYPE numeric(10,2) USING "text_to_numeric"::numeric(10,2);-ALTER TABLE "public"."risky_conversions" ALTER COLUMN "timestamp_field" TYPE date;-diff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/incompatible_conversions/diff.json b/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/incompatible_conversions/diff.jsondeleted file mode 100644index a0ee94b871..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/incompatible_conversions/diff.json+++ /dev/null@@ -1,209 +0,0 @@-{- "hasDifferences": true,- "summary": "Table changes: 2",- "tableChanges": 2,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 0,- "enumTypeChanges": 0,- "details": {- "tables": [- {- "action": "ALTER",- "schemaName": "public",- "tableName": "data_conflicts",- "columnChanges": 4,- "indexChanges": 1,- "constraintChanges": 0,- "foreignKeyChanges": 0,- "columns": [- {- "action": "ALTER",- "name": "default_change",- "oldColumn": {- "name": "default_change",- "type": "integer",- "nullable": true,- "defaultValue": "100"- },- "newColumn": {- "name": "default_change",- "type": "integer",- "nullable": true,- "defaultValue": "999"- }- },- {- "action": "ALTER",- "name": "nullable_required",- "oldColumn": {- "name": "nullable_required",- "type": "character varying(100)",- "nullable": true- },- "newColumn": {- "name": "nullable_required",- "type": "character varying(100)",- "nullable": false- }- },- {- "action": "ALTER",- "name": "type_change",- "oldColumn": {- "name": "type_change",- "type": "text",- "nullable": true- },- "newColumn": {- "name": "type_change",- "type": "integer",- "nullable": true- }- },- {- "action": "ALTER",- "name": "wide_varchar",- "oldColumn": {- "name": "wide_varchar",- "type": "character varying(500)",- "nullable": false- },- "newColumn": {- "name": "wide_varchar",- "type": "character varying(10)",- "nullable": false- }- }- ],- "indexes": [- {- "action": "CREATE",- "name": "data_conflicts_unique_field_key",- "newIndex": {- "name": "data_conflicts_unique_field_key",- "type": "btree",- "unique": true,- "expressions": [- "unique_field"- ],- "descending": [- false- ]- }- }- ]- },- {- "action": "ALTER",- "schemaName": "public",- "tableName": "risky_conversions",- "columnChanges": 7,- "indexChanges": 0,- "constraintChanges": 0,- "foreignKeyChanges": 0,- "columns": [- {- "action": "ALTER",- "name": "array_field",- "oldColumn": {- "name": "array_field",- "type": "_int4",- "nullable": true- },- "newColumn": {- "name": "array_field",- "type": "text",- "nullable": true- }- },- {- "action": "ALTER",- "name": "high_precision",- "oldColumn": {- "name": "high_precision",- "type": "double precision",- "nullable": true- },- "newColumn": {- "name": "high_precision",- "type": "real",- "nullable": true- }- },- {- "action": "ALTER",- "name": "json_field",- "oldColumn": {- "name": "json_field",- "type": "jsonb",- "nullable": true- },- "newColumn": {- "name": "json_field",- "type": "text",- "nullable": true- }- },- {- "action": "ALTER",- "name": "large_int",- "oldColumn": {- "name": "large_int",- "type": "bigint",- "nullable": true- },- "newColumn": {- "name": "large_int",- "type": "smallint",- "nullable": true- }- },- {- "action": "ALTER",- "name": "numeric_text",- "oldColumn": {- "name": "numeric_text",- "type": "text",- "nullable": true- },- "newColumn": {- "name": "numeric_text",- "type": "integer",- "nullable": true- }- },- {- "action": "ALTER",- "name": "text_to_numeric",- "oldColumn": {- "name": "text_to_numeric",- "type": "character varying(100)",- "nullable": false- },- "newColumn": {- "name": "text_to_numeric",- "type": "numeric(10,2)",- "nullable": false- }- },- {- "action": "ALTER",- "name": "timestamp_field",- "oldColumn": {- "name": "timestamp_field",- "type": "timestamp(6) with time zone",- "nullable": true- },- "newColumn": {- "name": "timestamp_field",- "type": "date",- "nullable": true- }- }- ]- }- ]- }-}\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/incompatible_conversions/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/incompatible_conversions/expected_schema.sqldeleted file mode 100644index cd80abbc38..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/incompatible_conversions/expected_schema.sql+++ /dev/null@@ -1,29 +0,0 @@--- Schema with potentially incompatible type conversions-CREATE TABLE public.risky_conversions (- conversion_id SERIAL PRIMARY KEY,- text_to_numeric NUMERIC(10,2) NOT NULL, -- VARCHAR(100) → NUMERIC(10,2) (data validation required)- large_int SMALLINT, -- BIGINT → SMALLINT (potential overflow)- high_precision REAL, -- DOUBLE PRECISION → REAL (precision loss)- timestamp_field DATE, -- TIMESTAMP WITH TIME ZONE → DATE (time component lost)- json_field TEXT, -- JSONB → TEXT (structure lost)- array_field TEXT, -- INTEGER[] → TEXT (array structure lost)- numeric_text INTEGER -- TEXT → INTEGER (parsing required)-);--CREATE TABLE public.data_conflicts (- conflict_id SERIAL PRIMARY KEY,- wide_varchar VARCHAR(10) NOT NULL, -- VARCHAR(500) → VARCHAR(10) (truncation risk)- nullable_required VARCHAR(100) NOT NULL, -- Added NOT NULL constraint (existing nulls problem)- unique_field VARCHAR(100) UNIQUE, -- Added UNIQUE constraint (duplicate values problem)- default_change INTEGER DEFAULT 999, -- Changed default: 100 → 999- type_change INTEGER -- TEXT → INTEGER (parsing validation required)-);---- These conversions represent various incompatibility scenarios:--- 1. Data validation failures (text that can't convert to numeric)--- 2. Data truncation (large values that don't fit in smaller types)--- 3. Precision loss (high precision to low precision)--- 4. Information loss (timestamp to date, structured to text)--- 5. Constraint violations (nulls where NOT NULL required)--- 6. Uniqueness violations (duplicates where UNIQUE required)--- 7. Format validation failures (invalid integer strings)\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/incompatible_conversions/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/incompatible_conversions/initial_schema.sqldeleted file mode 100644index 07d80c5840..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/incompatible_conversions/initial_schema.sql+++ /dev/null@@ -1,20 +0,0 @@--- Initial schema with types that will be converted incompatibly-CREATE TABLE public.risky_conversions (- conversion_id SERIAL PRIMARY KEY,- text_to_numeric VARCHAR(100) NOT NULL, -- Will convert to NUMERIC- large_int BIGINT, -- Will convert to SMALLINT (lossy)- high_precision DOUBLE PRECISION, -- Will convert to REAL (precision loss)- timestamp_field TIMESTAMP WITH TIME ZONE, -- Will convert to DATE (time loss)- json_field JSONB, -- Will convert to TEXT- array_field INTEGER[], -- Will convert to TEXT- numeric_text TEXT -- Contains numeric data, will convert to INTEGER-);--CREATE TABLE public.data_conflicts (- conflict_id SERIAL PRIMARY KEY,- wide_varchar VARCHAR(500) NOT NULL, -- Will reduce to VARCHAR(10)- nullable_required VARCHAR(100), -- Will become NOT NULL- unique_field VARCHAR(100), -- Will add UNIQUE constraint- default_change INTEGER DEFAULT 100, -- Will change default value- type_change TEXT -- Will change to completely different type-);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/incompatible_conversions/test_description.md b/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/incompatible_conversions/test_description.mddeleted file mode 100644index d20278466a..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/incompatible_conversions/test_description.md+++ /dev/null@@ -1,25 +0,0 @@-# Incompatible Data Type Conversions Test--This test validates the SDL migration handling of potentially incompatible type conversions that may require data validation or cause data loss:--**High Risk Conversions**:-- VARCHAR(100) → NUMERIC(10,2) - Text to numeric conversion requiring validation-- BIGINT → SMALLINT - Potential integer overflow-- DOUBLE PRECISION → REAL - Precision loss in floating point-- TIMESTAMP WITH TIME ZONE → DATE - Time component loss--**Data Structure Loss**:-- JSONB → TEXT - Structured data becomes plain text-- INTEGER[] → TEXT - Array structure becomes string representation-- TEXT → INTEGER - String parsing with potential failures--**Constraint Conflicts**:-- VARCHAR(500) → VARCHAR(10) - Potential data truncation-- NULL allowed → NOT NULL - Existing null values become invalid-- No constraint → UNIQUE - Existing duplicates become invalid-- Default value changes - May affect application behavior--**Format Validation**:-- TEXT → INTEGER - String parsing validation required--These conversions typically require careful data migration planning and validation to ensure no data loss or constraint violations occur during the schema evolution.\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/precision_changes/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/precision_changes/ddl.sqldeleted file mode 100644index b1ee4f2caa..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/precision_changes/ddl.sql+++ /dev/null@@ -1,37 +0,0 @@-CREATE SEQUENCE "public"."precision_test_test_id_seq" START WITH 1 INCREMENT BY 1;-ALTER TABLE "public"."data_samples" ALTER COLUMN "bit_flags" TYPE bit(32);-ALTER TABLE "public"."data_samples" ALTER COLUMN "bit_flags" DROP DEFAULT;-ALTER TABLE "public"."data_samples" ALTER COLUMN "bit_flags" SET DEFAULT B'00000000000000000000000000000000';-ALTER TABLE "public"."data_samples" ALTER COLUMN "fixed_char" TYPE character(20);-ALTER TABLE "public"."data_samples" ALTER COLUMN "long_text" TYPE character varying(150);-ALTER TABLE "public"."data_samples" ALTER COLUMN "precise_decimal" TYPE numeric(16,6);-ALTER TABLE "public"."data_samples" ALTER COLUMN "precise_decimal" DROP DEFAULT;-ALTER TABLE "public"."data_samples" ALTER COLUMN "precise_decimal" SET DEFAULT 0.000000;-ALTER TABLE "public"."data_samples" ALTER COLUMN "short_text" TYPE character varying(100);-ALTER TABLE "public"."data_samples" ALTER COLUMN "simple_decimal" TYPE numeric(5,1);-ALTER TABLE "public"."data_samples" ALTER COLUMN "simple_decimal" DROP DEFAULT;-ALTER TABLE "public"."data_samples" ALTER COLUMN "simple_decimal" SET DEFAULT 0.0;-ALTER TABLE "public"."data_samples" ALTER COLUMN "var_bits" TYPE bit varying(16);--ALTER TABLE "public"."measurements" ALTER COLUMN "device_name" TYPE character varying(150);-ALTER TABLE "public"."measurements" ALTER COLUMN "location_code" TYPE character(15);-ALTER TABLE "public"."measurements" ALTER COLUMN "metadata_bits" TYPE bit varying(32);-ALTER TABLE "public"."measurements" ALTER COLUMN "status_bits" TYPE bit(64);-ALTER TABLE "public"."measurements" ALTER COLUMN "value_high_precision" TYPE numeric(20,12);-ALTER TABLE "public"."measurements" ALTER COLUMN "value_low_precision" TYPE numeric(6,2);--CREATE TABLE "public"."precision_test" (- "test_id" integer NOT NULL DEFAULT nextval('public.precision_test_test_id_seq'::regclass),- "expand_varchar" character varying(500),- "reduce_varchar" character varying(25),- "expand_numeric" numeric(25,10),- "reduce_numeric" numeric(4,1),- "expand_char" character(50),- "reduce_char" character(5),- "expand_bits" bit(128),- "reduce_bits" bit(4),- "expand_varbits" bit varying(256),- "reduce_varbits" bit varying(8)-);-ALTER TABLE "public"."precision_test" ADD CONSTRAINT "precision_test_pkey" PRIMARY KEY (test_id);-diff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/precision_changes/diff.json b/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/precision_changes/diff.jsondeleted file mode 100644index 93aafaf6e3..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/precision_changes/diff.json+++ /dev/null@@ -1,233 +0,0 @@-{- "hasDifferences": true,- "summary": "Table changes: 3, Sequence changes: 1",- "tableChanges": 3,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 1,- "enumTypeChanges": 0,- "details": {- "tables": [- {- "action": "ALTER",- "schemaName": "public",- "tableName": "data_samples",- "columnChanges": 7,- "indexChanges": 0,- "constraintChanges": 0,- "foreignKeyChanges": 0,- "columns": [- {- "action": "ALTER",- "name": "bit_flags",- "oldColumn": {- "name": "bit_flags",- "type": "bit(16)",- "nullable": true,- "defaultValue": "'0000000000000000'::\"bit\""- },- "newColumn": {- "name": "bit_flags",- "type": "bit(32)",- "nullable": true,- "defaultValue": "B'00000000000000000000000000000000'"- }- },- {- "action": "ALTER",- "name": "fixed_char",- "oldColumn": {- "name": "fixed_char",- "type": "character(10)",- "nullable": true- },- "newColumn": {- "name": "fixed_char",- "type": "character(20)",- "nullable": true- }- },- {- "action": "ALTER",- "name": "long_text",- "oldColumn": {- "name": "long_text",- "type": "character varying(200)",- "nullable": true- },- "newColumn": {- "name": "long_text",- "type": "character varying(150)",- "nullable": true- }- },- {- "action": "ALTER",- "name": "precise_decimal",- "oldColumn": {- "name": "precise_decimal",- "type": "numeric(12,4)",- "nullable": true,- "defaultValue": "0.0000"- },- "newColumn": {- "name": "precise_decimal",- "type": "numeric(16,6)",- "nullable": true,- "defaultValue": "0.000000"- }- },- {- "action": "ALTER",- "name": "short_text",- "oldColumn": {- "name": "short_text",- "type": "character varying(50)",- "nullable": false- },- "newColumn": {- "name": "short_text",- "type": "character varying(100)",- "nullable": false- }- },- {- "action": "ALTER",- "name": "simple_decimal",- "oldColumn": {- "name": "simple_decimal",- "type": "numeric(6,2)",- "nullable": true,- "defaultValue": "0.00"- },- "newColumn": {- "name": "simple_decimal",- "type": "numeric(5,1)",- "nullable": true,- "defaultValue": "0.0"- }- },- {- "action": "ALTER",- "name": "var_bits",- "oldColumn": {- "name": "var_bits",- "type": "bit varying(32)",- "nullable": true- },- "newColumn": {- "name": "var_bits",- "type": "bit varying(16)",- "nullable": true- }- }- ]- },- {- "action": "ALTER",- "schemaName": "public",- "tableName": "measurements",- "columnChanges": 6,- "indexChanges": 0,- "constraintChanges": 0,- "foreignKeyChanges": 0,- "columns": [- {- "action": "ALTER",- "name": "device_name",- "oldColumn": {- "name": "device_name",- "type": "character varying(100)",- "nullable": false- },- "newColumn": {- "name": "device_name",- "type": "character varying(150)",- "nullable": false- }- },- {- "action": "ALTER",- "name": "location_code",- "oldColumn": {- "name": "location_code",- "type": "character(20)",- "nullable": true- },- "newColumn": {- "name": "location_code",- "type": "character(15)",- "nullable": true- }- },- {- "action": "ALTER",- "name": "metadata_bits",- "oldColumn": {- "name": "metadata_bits",- "type": "bit varying(64)",- "nullable": true- },- "newColumn": {- "name": "metadata_bits",- "type": "bit varying(32)",- "nullable": true- }- },- {- "action": "ALTER",- "name": "status_bits",- "oldColumn": {- "name": "status_bits",- "type": "bit(32)",- "nullable": true- },- "newColumn": {- "name": "status_bits",- "type": "bit(64)",- "nullable": true- }- },- {- "action": "ALTER",- "name": "value_high_precision",- "oldColumn": {- "name": "value_high_precision",- "type": "numeric(15,8)",- "nullable": true- },- "newColumn": {- "name": "value_high_precision",- "type": "numeric(20,12)",- "nullable": true- }- },- {- "action": "ALTER",- "name": "value_low_precision",- "oldColumn": {- "name": "value_low_precision",- "type": "numeric(8,3)",- "nullable": true- },- "newColumn": {- "name": "value_low_precision",- "type": "numeric(6,2)",- "nullable": true- }- }- ]- },- {- "action": "CREATE",- "schemaName": "public",- "tableName": "precision_test",- "columnChanges": 0,- "indexChanges": 0,- "constraintChanges": 0,- "foreignKeyChanges": 0- }- ]- }-}\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/precision_changes/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/precision_changes/expected_schema.sqldeleted file mode 100644index 8951c88b8f..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/precision_changes/expected_schema.sql+++ /dev/null@@ -1,35 +0,0 @@--- Schema with mixed precision changes (both expansions and reductions)-CREATE TABLE public.data_samples (- sample_id SERIAL PRIMARY KEY,- short_text VARCHAR(100) NOT NULL, -- Expanded: VARCHAR(50) → VARCHAR(100)- long_text VARCHAR(150), -- Reduced: VARCHAR(200) → VARCHAR(150)- fixed_char CHAR(20), -- Expanded: CHAR(10) → CHAR(20)- precise_decimal NUMERIC(16,6) DEFAULT 0.000000, -- Expanded: NUMERIC(12,4) → NUMERIC(16,6)- simple_decimal NUMERIC(5,1) DEFAULT 0.0, -- Reduced: NUMERIC(6,2) → NUMERIC(5,1)- bit_flags BIT(32) DEFAULT B'00000000000000000000000000000000', -- Expanded: BIT(16) → BIT(32)- var_bits VARBIT(16) -- Reduced: VARBIT(32) → VARBIT(16)-);--CREATE TABLE public.measurements (- measurement_id SERIAL PRIMARY KEY,- device_name VARCHAR(150) NOT NULL, -- Expanded: VARCHAR(100) → VARCHAR(150)- location_code CHAR(15), -- Reduced: CHAR(20) → CHAR(15)- value_high_precision NUMERIC(20,12), -- Expanded: NUMERIC(15,8) → NUMERIC(20,12)- value_low_precision NUMERIC(6,2), -- Reduced: NUMERIC(8,3) → NUMERIC(6,2)- status_bits BIT(64), -- Expanded: BIT(32) → BIT(64)- metadata_bits VARBIT(32) -- Reduced: VARBIT(64) → VARBIT(32)-);--CREATE TABLE public.precision_test (- test_id SERIAL PRIMARY KEY,- expand_varchar VARCHAR(500), -- New expanded varchar- reduce_varchar VARCHAR(25), -- New reduced varchar- expand_numeric NUMERIC(25,10), -- New high precision numeric- reduce_numeric NUMERIC(4,1), -- New low precision numeric- expand_char CHAR(50), -- New expanded char- reduce_char CHAR(5), -- New reduced char- expand_bits BIT(128), -- New expanded bit- reduce_bits BIT(4), -- New reduced bit- expand_varbits VARBIT(256), -- New expanded varbit- reduce_varbits VARBIT(8) -- New reduced varbit-);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/precision_changes/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/precision_changes/initial_schema.sqldeleted file mode 100644index 86f2fe1401..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/precision_changes/initial_schema.sql+++ /dev/null@@ -1,21 +0,0 @@--- Initial schema with various precisions-CREATE TABLE public.data_samples (- sample_id SERIAL PRIMARY KEY,- short_text VARCHAR(50) NOT NULL,- long_text VARCHAR(200),- fixed_char CHAR(10),- precise_decimal NUMERIC(12,4) DEFAULT 0.0000,- simple_decimal NUMERIC(6,2) DEFAULT 0.00,- bit_flags BIT(16) DEFAULT B'0000000000000000',- var_bits VARBIT(32)-);--CREATE TABLE public.measurements (- measurement_id SERIAL PRIMARY KEY,- device_name VARCHAR(100) NOT NULL,- location_code CHAR(20),- value_high_precision NUMERIC(15,8),- value_low_precision NUMERIC(8,3),- status_bits BIT(32),- metadata_bits VARBIT(64)-);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/precision_changes/test_description.md b/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/precision_changes/test_description.mddeleted file mode 100644index 71cc544aed..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/data_types/type_conversions/precision_changes/test_description.md+++ /dev/null@@ -1,18 +0,0 @@-# Data Type Precision Changes Test--This test validates the SDL migration handling of precision modifications:--**Expanding Precision (Safe)**:-- VARCHAR(50) → VARCHAR(100)-- NUMERIC(8,2) → NUMERIC(12,4)-- CHAR(10) → CHAR(20)-- BIT(8) → BIT(16)-- VARBIT(16) → VARBIT(32)--**Reducing Precision (Potentially Unsafe)**:-- VARCHAR(100) → VARCHAR(50)-- NUMERIC(12,4) → NUMERIC(8,2)-- CHAR(20) → CHAR(10)-- BIT(16) → BIT(8)--Tests both safe precision expansions and potentially risky precision reductions that may require data validation.\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/create_basic_enum/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/create_basic_enum/ddl.sqldeleted file mode 100644index 85ba7391b4..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/create_basic_enum/ddl.sql+++ /dev/null@@ -1,2 +0,0 @@-CREATE TYPE "public"."order_status" AS ENUM ('pending', 'processing', 'shipped', 'delivered', 'cancelled');-diff --git a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/create_basic_enum/diff.json b/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/create_basic_enum/diff.jsondeleted file mode 100644index 1c82bc49b1..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/create_basic_enum/diff.json+++ /dev/null@@ -1,20 +0,0 @@-{- "hasDifferences": true,- "summary": "Enum type changes: 1",- "tableChanges": 0,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 0,- "enumTypeChanges": 1,- "details": {- "enumTypes": [- {- "action": "CREATE",- "schemaName": "public",- "enumName": "order_status",- "values": ["pending", "processing", "shipped", "delivered", "cancelled"]- }- ]- }-}diff --git a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/create_basic_enum/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/create_basic_enum/expected_schema.sqldeleted file mode 100644index 4dd878e77c..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/create_basic_enum/expected_schema.sql+++ /dev/null@@ -1,7 +0,0 @@-CREATE TYPE public.order_status AS ENUM (- 'pending',- 'processing',- 'shipped',- 'delivered',- 'cancelled'-);diff --git a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/create_basic_enum/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/create_basic_enum/initial_schema.sqldeleted file mode 100644index 0bd564f903..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/create_basic_enum/initial_schema.sql+++ /dev/null@@ -1 +0,0 @@--- Empty initial schemadiff --git a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/create_basic_enum/test_description.md b/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/create_basic_enum/test_description.mddeleted file mode 100644index 4ec8a49174..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/create_basic_enum/test_description.md+++ /dev/null@@ -1,20 +0,0 @@-# Create Basic Enum Test--This test validates the SDL migration handling of creating enum types:--## Test Coverage--- **Enum Creation**: Creating a new enum type with multiple values-- **Value Ordering**: Preserving the order of enum values-- **Schema Qualification**: Enums created in the public schema--## Validation Goals--- Verify accurate detection of new enum types-- Validate proper CREATE TYPE DDL generation-- Ensure enum values are correctly ordered-- Test enum type can be referenced by tables--## Expected Behavior--The migration should generate proper CREATE TYPE ... AS ENUM statements with all values in the correct order.diff --git a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/drop_enum/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/drop_enum/ddl.sqldeleted file mode 100644index 3d4833bcd6..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/drop_enum/ddl.sql+++ /dev/null@@ -1,2 +0,0 @@-DROP TYPE "public"."priority_level";-diff --git a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/drop_enum/diff.json b/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/drop_enum/diff.jsondeleted file mode 100644index 938feee8c0..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/drop_enum/diff.json+++ /dev/null@@ -1,19 +0,0 @@-{- "hasDifferences": true,- "summary": "Enum type changes: 1",- "tableChanges": 0,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 0,- "enumTypeChanges": 1,- "details": {- "enumTypes": [- {- "action": "DROP",- "schemaName": "public",- "enumName": "priority_level"- }- ]- }-}diff --git a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/drop_enum/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/drop_enum/expected_schema.sqldeleted file mode 100644index 43d6c5e1ee..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/drop_enum/expected_schema.sql+++ /dev/null@@ -1 +0,0 @@--- Empty schema after dropping enumdiff --git a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/drop_enum/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/drop_enum/initial_schema.sqldeleted file mode 100644index 29dc14ec56..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/drop_enum/initial_schema.sql+++ /dev/null@@ -1,6 +0,0 @@-CREATE TYPE public.priority_level AS ENUM (- 'low',- 'medium',- 'high',- 'critical'-);diff --git a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/drop_enum/test_description.md b/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/drop_enum/test_description.mddeleted file mode 100644index 7d35e62ae4..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/drop_enum/test_description.md+++ /dev/null@@ -1,20 +0,0 @@-# Drop Enum Test--This test validates the SDL migration handling of dropping enum types:--## Test Coverage--- **Enum Deletion**: Removing an enum type from schema-- **Clean Removal**: Dropping enum that is not used by any table-- **DDL Generation**: Proper DROP TYPE statement generation--## Validation Goals--- Verify accurate detection of removed enum types-- Validate proper DROP TYPE DDL generation-- Ensure enum can only be dropped when not in use-- Test cleanup of unused enum types--## Expected Behavior--The migration should generate proper DROP TYPE statement when enum is removed from SDL and is not referenced by any table.diff --git a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/enum_used_by_table/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/enum_used_by_table/ddl.sqldeleted file mode 100644index 14aa5e915c..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/enum_used_by_table/ddl.sql+++ /dev/null@@ -1,9 +0,0 @@-CREATE TYPE "public"."order_status" AS ENUM ('pending', 'confirmed', 'shipped', 'delivered');-CREATE TABLE "public"."orders" (- "id" serial NOT NULL,- "order_number" character varying(50) NOT NULL,- "status" "public"."order_status" DEFAULT 'pending',- "created_at" timestamp(6) without time zone DEFAULT CURRENT_TIMESTAMP,- CONSTRAINT "orders_pkey" PRIMARY KEY ("id")-);-diff --git a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/enum_used_by_table/diff.json b/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/enum_used_by_table/diff.jsondeleted file mode 100644index 83838db445..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/enum_used_by_table/diff.json+++ /dev/null@@ -1,31 +0,0 @@-{- "hasDifferences": true,- "summary": "Table changes: 1, Enum type changes: 1",- "tableChanges": 1,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 0,- "enumTypeChanges": 1,- "details": {- "enumTypes": [- {- "action": "CREATE",- "schemaName": "public",- "enumName": "order_status",- "values": ["pending", "confirmed", "shipped", "delivered"]- }- ],- "tables": [- {- "action": "CREATE",- "schemaName": "public",- "tableName": "orders",- "columnChanges": 4,- "indexChanges": 0,- "constraintChanges": 1,- "foreignKeyChanges": 0- }- ]- }-}diff --git a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/enum_used_by_table/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/enum_used_by_table/expected_schema.sqldeleted file mode 100644index 12fa40d2e2..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/enum_used_by_table/expected_schema.sql+++ /dev/null@@ -1,13 +0,0 @@-CREATE TYPE public.order_status AS ENUM (- 'pending',- 'confirmed',- 'shipped',- 'delivered'-);--CREATE TABLE public.orders (- id SERIAL PRIMARY KEY,- order_number VARCHAR(50) NOT NULL,- status order_status DEFAULT 'pending',- created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP-);diff --git a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/enum_used_by_table/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/enum_used_by_table/initial_schema.sqldeleted file mode 100644index 0bd564f903..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/enum_used_by_table/initial_schema.sql+++ /dev/null@@ -1 +0,0 @@--- Empty initial schemadiff --git a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/enum_used_by_table/test_description.md b/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/enum_used_by_table/test_description.mddeleted file mode 100644index 5d48fff919..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/database_objects/enums/enum_used_by_table/test_description.md+++ /dev/null@@ -1,21 +0,0 @@-# Enum Used by Table Test--This test validates the SDL migration handling of creating tables that use enum types:--## Test Coverage--- **Enum Type Creation**: Creating enum type before table-- **Table with Enum Column**: Table column using the enum type-- **Dependency Ordering**: Ensuring enum is created before table-- **Default Values**: Enum column with default value--## Validation Goals--- Verify proper ordering of CREATE TYPE before CREATE TABLE-- Validate table column correctly references enum type-- Ensure default enum values are handled correctly-- Test dependency resolution between enum and table--## Expected Behavior--The migration should generate CREATE TYPE statement first, followed by CREATE TABLE statement that references the enum type.diff --git a/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/create_extension/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/create_extension/ddl.sqldeleted file mode 100644index d356ced313..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/create_extension/ddl.sql+++ /dev/null@@ -1,2 +0,0 @@-CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA "public";-diff --git a/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/create_extension/diff.json b/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/create_extension/diff.jsondeleted file mode 100644index fc7b87005e..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/create_extension/diff.json+++ /dev/null@@ -1,20 +0,0 @@-{- "hasDifferences": true,- "summary": "Extension changes: 1",- "tableChanges": 0,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 0,- "enumTypeChanges": 0,- "extensionChanges": 1,- "details": {- "extensions": [- {- "action": "CREATE",- "extensionName": "uuid-ossp",- "schemaName": "public"- }- ]- }-}diff --git a/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/create_extension/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/create_extension/expected_schema.sqldeleted file mode 100644index 9a33290133..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/create_extension/expected_schema.sql+++ /dev/null@@ -1 +0,0 @@-CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA public;diff --git a/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/create_extension/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/create_extension/initial_schema.sqldeleted file mode 100644index 0bd564f903..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/create_extension/initial_schema.sql+++ /dev/null@@ -1 +0,0 @@--- Empty initial schemadiff --git a/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/create_extension/test_description.md b/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/create_extension/test_description.mddeleted file mode 100644index edc9346e04..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/create_extension/test_description.md+++ /dev/null@@ -1,20 +0,0 @@-# Create Extension Test--This test validates the SDL migration handling of creating PostgreSQL extensions:--## Test Coverage--- **Extension Creation**: Creating common PostgreSQL extensions-- **UUID Extension**: Creating uuid-ossp for UUID generation-- **Extension Dependencies**: Ensuring extensions are created before objects that use them--## Validation Goals--- Verify accurate detection of new extensions-- Validate proper CREATE EXTENSION DDL generation-- Ensure extension is created with correct schema-- Test extension availability for subsequent objects--## Expected Behavior--The migration should generate proper CREATE EXTENSION statements, typically near the beginning of the migration to ensure availability for other objects.diff --git a/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/drop_extension/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/drop_extension/ddl.sqldeleted file mode 100644index caacf30336..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/drop_extension/ddl.sql+++ /dev/null@@ -1,2 +0,0 @@-DROP EXTENSION "uuid-ossp";-diff --git a/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/drop_extension/diff.json b/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/drop_extension/diff.jsondeleted file mode 100644index 20aed4933a..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/drop_extension/diff.json+++ /dev/null@@ -1,19 +0,0 @@-{- "hasDifferences": true,- "summary": "Extension changes: 1",- "tableChanges": 0,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 0,- "enumTypeChanges": 0,- "extensionChanges": 1,- "details": {- "extensions": [- {- "action": "DROP",- "extensionName": "uuid-ossp"- }- ]- }-}diff --git a/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/drop_extension/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/drop_extension/expected_schema.sqldeleted file mode 100644index 60f79f3451..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/drop_extension/expected_schema.sql+++ /dev/null@@ -1 +0,0 @@--- Empty schema after dropping extensiondiff --git a/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/drop_extension/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/drop_extension/initial_schema.sqldeleted file mode 100644index 9a33290133..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/drop_extension/initial_schema.sql+++ /dev/null@@ -1 +0,0 @@-CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA public;diff --git a/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/drop_extension/test_description.md b/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/drop_extension/test_description.mddeleted file mode 100644index f7d242197b..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/database_objects/extensions/drop_extension/test_description.md+++ /dev/null@@ -1,20 +0,0 @@-# Drop Extension Test--This test validates the SDL migration handling of dropping PostgreSQL extensions:--## Test Coverage--- **Extension Deletion**: Removing an extension from schema-- **Clean Removal**: Dropping extension that is not used by any objects-- **DDL Generation**: Proper DROP EXTENSION statement generation--## Validation Goals--- Verify accurate detection of removed extensions-- Validate proper DROP EXTENSION DDL generation-- Ensure extension can only be dropped when not in use-- Test cleanup of unused extensions--## Expected Behavior--The migration should generate proper DROP EXTENSION statement when extension is removed from SDL and is not used by any objects.diff --git a/backend/plugin/schema/pg/sdl_testdata/dependencies/bidirectional_fk/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/dependencies/bidirectional_fk/ddl.sqldeleted file mode 100644index 3d0a14c323..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/dependencies/bidirectional_fk/ddl.sql+++ /dev/null@@ -1,15 +0,0 @@-CREATE TABLE "public"."departments" (- "id" serial NOT NULL,- "name" character varying(100) NOT NULL,- "manager_id" integer,- CONSTRAINT "departments_pkey" PRIMARY KEY ("id")-);-CREATE TABLE "public"."employees" (- "id" serial NOT NULL,- "name" character varying(100) NOT NULL,- "department_id" integer NOT NULL,- CONSTRAINT "employees_pkey" PRIMARY KEY ("id")-);-ALTER TABLE "public"."departments" ADD CONSTRAINT "fk_department_manager" FOREIGN KEY ("manager_id") REFERENCES "public"."employees"("id");-ALTER TABLE "public"."employees" ADD CONSTRAINT "fk_employee_department" FOREIGN KEY ("department_id") REFERENCES "public"."departments"("id");-diff --git a/backend/plugin/schema/pg/sdl_testdata/dependencies/bidirectional_fk/diff.json b/backend/plugin/schema/pg/sdl_testdata/dependencies/bidirectional_fk/diff.jsondeleted file mode 100644index f97ea0efb0..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/dependencies/bidirectional_fk/diff.json+++ /dev/null@@ -1,48 +0,0 @@-{- "hasDifferences": true,- "summary": "Table changes: 2",- "tableChanges": 2,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 0,- "enumTypeChanges": 0,- "details": {- "tables": [- {- "action": "CREATE",- "schemaName": "public",- "tableName": "departments",- "columnChanges": 3,- "foreignKeyChanges": 1,- "foreignKeys": [- {- "action": "CREATE",- "name": "fk_department_manager",- "columns": ["manager_id"],- "referencedSchema": "public",- "referencedTable": "employees",- "referencedColumns": ["id"]- }- ]- },- {- "action": "CREATE",- "schemaName": "public",- "tableName": "employees",- "columnChanges": 3,- "foreignKeyChanges": 1,- "foreignKeys": [- {- "action": "CREATE",- "name": "fk_employee_department",- "columns": ["department_id"],- "referencedSchema": "public",- "referencedTable": "departments",- "referencedColumns": ["id"]- }- ]- }- ]- }-}diff --git a/backend/plugin/schema/pg/sdl_testdata/dependencies/bidirectional_fk/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/dependencies/bidirectional_fk/expected_schema.sqldeleted file mode 100644index 6a2ee89a41..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/dependencies/bidirectional_fk/expected_schema.sql+++ /dev/null@@ -1,13 +0,0 @@-CREATE TABLE public.departments (- id SERIAL PRIMARY KEY,- name VARCHAR(100) NOT NULL,- manager_id INTEGER,- CONSTRAINT fk_department_manager FOREIGN KEY (manager_id) REFERENCES employees(id)-);--CREATE TABLE public.employees (- id SERIAL PRIMARY KEY,- name VARCHAR(100) NOT NULL,- department_id INTEGER NOT NULL,- CONSTRAINT fk_employee_department FOREIGN KEY (department_id) REFERENCES departments(id)-);diff --git a/backend/plugin/schema/pg/sdl_testdata/dependencies/bidirectional_fk/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/dependencies/bidirectional_fk/initial_schema.sqldeleted file mode 100644index 0bd564f903..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/dependencies/bidirectional_fk/initial_schema.sql+++ /dev/null@@ -1 +0,0 @@--- Empty initial schemadiff --git a/backend/plugin/schema/pg/sdl_testdata/dependencies/bidirectional_fk/test_description.md b/backend/plugin/schema/pg/sdl_testdata/dependencies/bidirectional_fk/test_description.mddeleted file mode 100644index c79380908e..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/dependencies/bidirectional_fk/test_description.md+++ /dev/null@@ -1,21 +0,0 @@-# Bidirectional Foreign Key Test--This test validates the SDL migration handling of bidirectional foreign key relationships:--## Test Coverage--- **Bidirectional FKs**: Two tables with FKs to each other-- **Circular Dependencies**: Managing circular dependencies between tables-- **Deferred Constraints**: Creating tables first, then adding FKs-- **Dependency Resolution**: Proper ordering of CREATE and ALTER statements--## Validation Goals--- Verify accurate detection of bidirectional FK relationships-- Validate proper DDL generation to avoid circular dependency errors-- Ensure tables are created before FK constraints-- Test handling of mutual dependencies between tables--## Expected Behavior--The migration should create both tables without FK constraints first, then add FK constraints using ALTER TABLE statements to break the circular dependency.diff --git a/backend/plugin/schema/pg/sdl_testdata/dependencies/cyclic_fk_with_views/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/dependencies/cyclic_fk_with_views/ddl.sqldeleted file mode 100644index d1b7e8b778..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/dependencies/cyclic_fk_with_views/ddl.sql+++ /dev/null@@ -1,33 +0,0 @@-CREATE TABLE "public"."authors" (- "id" serial NOT NULL,- "name" character varying(100) NOT NULL,- "featured_book_id" integer,- CONSTRAINT "authors_pkey" PRIMARY KEY ("id")-);-CREATE TABLE "public"."books" (- "id" serial NOT NULL,- "title" character varying(200) NOT NULL,- "author_id" integer NOT NULL,- "publication_year" integer,- CONSTRAINT "books_pkey" PRIMARY KEY ("id")-);-ALTER TABLE "public"."authors" ADD CONSTRAINT "fk_featured_book" FOREIGN KEY ("featured_book_id") REFERENCES "public"."books"("id");-ALTER TABLE "public"."books" ADD CONSTRAINT "fk_book_author" FOREIGN KEY ("author_id") REFERENCES "public"."authors"("id");-CREATE VIEW "public"."author_book_summary" AS-SELECT- a.id as author_id,- a.name as author_name,- b.id as book_id,- b.title as book_title,- b.publication_year-FROM authors a-JOIN books b ON a.id = b.author_id;-CREATE VIEW "public"."prolific_authors" AS-SELECT- author_id,- author_name,- COUNT(*) as book_count-FROM author_book_summary-GROUP BY author_id, author_name-HAVING COUNT(*) > 5;-diff --git a/backend/plugin/schema/pg/sdl_testdata/dependencies/cyclic_fk_with_views/diff.json b/backend/plugin/schema/pg/sdl_testdata/dependencies/cyclic_fk_with_views/diff.jsondeleted file mode 100644index dc08391ea4..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/dependencies/cyclic_fk_with_views/diff.json+++ /dev/null@@ -1,60 +0,0 @@-{- "hasDifferences": true,- "summary": "Table changes: 2, View changes: 2",- "tableChanges": 2,- "viewChanges": 2,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 0,- "enumTypeChanges": 0,- "details": {- "tables": [- {- "action": "CREATE",- "schemaName": "public",- "tableName": "authors",- "foreignKeyChanges": 1,- "foreignKeys": [- {- "action": "CREATE",- "name": "fk_featured_book",- "columns": ["featured_book_id"],- "referencedSchema": "public",- "referencedTable": "books",- "referencedColumns": ["id"]- }- ]- },- {- "action": "CREATE",- "schemaName": "public",- "tableName": "books",- "foreignKeyChanges": 1,- "foreignKeys": [- {- "action": "CREATE",- "name": "fk_book_author",- "columns": ["author_id"],- "referencedSchema": "public",- "referencedTable": "authors",- "referencedColumns": ["id"]- }- ]- }- ],- "views": [- {- "action": "CREATE",- "schemaName": "public",- "viewName": "author_book_summary",- "dependsOn": ["authors", "books"]- },- {- "action": "CREATE",- "schemaName": "public",- "viewName": "prolific_authors",- "dependsOn": ["author_book_summary"]- }- ]- }-}diff --git a/backend/plugin/schema/pg/sdl_testdata/dependencies/cyclic_fk_with_views/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/dependencies/cyclic_fk_with_views/expected_schema.sqldeleted file mode 100644index 83d11e8db7..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/dependencies/cyclic_fk_with_views/expected_schema.sql+++ /dev/null@@ -1,33 +0,0 @@-CREATE TABLE public.authors (- id SERIAL PRIMARY KEY,- name VARCHAR(100) NOT NULL,- featured_book_id INTEGER,- CONSTRAINT fk_featured_book FOREIGN KEY (featured_book_id) REFERENCES books(id)-);--CREATE TABLE public.books (- id SERIAL PRIMARY KEY,- title VARCHAR(200) NOT NULL,- author_id INTEGER NOT NULL,- publication_year INTEGER,- CONSTRAINT fk_book_author FOREIGN KEY (author_id) REFERENCES authors(id)-);--CREATE VIEW public.author_book_summary AS-SELECT- a.id as author_id,- a.name as author_name,- b.id as book_id,- b.title as book_title,- b.publication_year-FROM authors a-JOIN books b ON a.id = b.author_id;--CREATE VIEW public.prolific_authors AS-SELECT- author_id,- author_name,- COUNT(*) as book_count-FROM author_book_summary-GROUP BY author_id, author_name-HAVING COUNT(*) > 5;diff --git a/backend/plugin/schema/pg/sdl_testdata/dependencies/cyclic_fk_with_views/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/dependencies/cyclic_fk_with_views/initial_schema.sqldeleted file mode 100644index 0bd564f903..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/dependencies/cyclic_fk_with_views/initial_schema.sql+++ /dev/null@@ -1 +0,0 @@--- Empty initial schemadiff --git a/backend/plugin/schema/pg/sdl_testdata/dependencies/cyclic_fk_with_views/test_description.md b/backend/plugin/schema/pg/sdl_testdata/dependencies/cyclic_fk_with_views/test_description.mddeleted file mode 100644index 1f0b05eab5..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/dependencies/cyclic_fk_with_views/test_description.md+++ /dev/null@@ -1,21 +0,0 @@-# Cyclic FK with Views Test--This test validates the SDL migration handling of views depending on tables with cyclic foreign keys:--## Test Coverage--- **Complex Dependencies**: Cyclic FKs combined with view dependencies-- **Multi-Layer Dependencies**: Views that depend on tables with circular FKs-- **Dependency Resolution**: Proper ordering across multiple dependency types-- **Mixed Object Types**: Tables, FKs, and views in correct order--## Validation Goals--- Verify accurate detection of complex dependency chains-- Validate proper ordering of CREATE TABLE, ALTER TABLE, and CREATE VIEW-- Ensure cyclic FKs don't block view creation-- Test handling of multi-dimensional dependencies--## Expected Behavior--The migration should create tables first, then add FK constraints, then create views that depend on those tables, ensuring all dependencies are satisfied in the correct order.diff --git a/backend/plugin/schema/pg/sdl_testdata/dependencies/simple_cyclic_fk/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/dependencies/simple_cyclic_fk/ddl.sqldeleted file mode 100644index 2d482be016..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/dependencies/simple_cyclic_fk/ddl.sql+++ /dev/null@@ -1,8 +0,0 @@-CREATE TABLE "public"."employees" (- "id" serial NOT NULL,- "name" character varying(100) NOT NULL,- "manager_id" integer,- CONSTRAINT "employees_pkey" PRIMARY KEY ("id")-);-ALTER TABLE "public"."employees" ADD CONSTRAINT "fk_manager" FOREIGN KEY ("manager_id") REFERENCES "public"."employees"("id") ON DELETE SET NULL;-diff --git a/backend/plugin/schema/pg/sdl_testdata/dependencies/simple_cyclic_fk/diff.json b/backend/plugin/schema/pg/sdl_testdata/dependencies/simple_cyclic_fk/diff.jsondeleted file mode 100644index 843a89eae2..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/dependencies/simple_cyclic_fk/diff.json+++ /dev/null@@ -1,35 +0,0 @@-{- "hasDifferences": true,- "summary": "Table changes: 1",- "tableChanges": 1,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 0,- "enumTypeChanges": 0,- "details": {- "tables": [- {- "action": "CREATE",- "schemaName": "public",- "tableName": "employees",- "columnChanges": 3,- "indexChanges": 0,- "constraintChanges": 1,- "foreignKeyChanges": 1,- "foreignKeys": [- {- "action": "CREATE",- "name": "fk_manager",- "columns": ["manager_id"],- "referencedSchema": "public",- "referencedTable": "employees",- "referencedColumns": ["id"],- "onDelete": "SET NULL",- "selfReferencing": true- }- ]- }- ]- }-}diff --git a/backend/plugin/schema/pg/sdl_testdata/dependencies/simple_cyclic_fk/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/dependencies/simple_cyclic_fk/expected_schema.sqldeleted file mode 100644index 4fddfba4e7..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/dependencies/simple_cyclic_fk/expected_schema.sql+++ /dev/null@@ -1,6 +0,0 @@-CREATE TABLE public.employees (- id SERIAL PRIMARY KEY,- name VARCHAR(100) NOT NULL,- manager_id INTEGER,- CONSTRAINT fk_manager FOREIGN KEY (manager_id) REFERENCES employees(id) ON DELETE SET NULL-);diff --git a/backend/plugin/schema/pg/sdl_testdata/dependencies/simple_cyclic_fk/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/dependencies/simple_cyclic_fk/initial_schema.sqldeleted file mode 100644index 0bd564f903..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/dependencies/simple_cyclic_fk/initial_schema.sql+++ /dev/null@@ -1 +0,0 @@--- Empty initial schemadiff --git a/backend/plugin/schema/pg/sdl_testdata/dependencies/simple_cyclic_fk/test_description.md b/backend/plugin/schema/pg/sdl_testdata/dependencies/simple_cyclic_fk/test_description.mddeleted file mode 100644index c0f4ceaa76..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/dependencies/simple_cyclic_fk/test_description.md+++ /dev/null@@ -1,21 +0,0 @@-# Simple Cyclic Foreign Key Test--This test validates the SDL migration handling of self-referencing foreign keys:--## Test Coverage--- **Self-Referencing FK**: Table with FK to itself-- **Deferred Constraints**: Handling of constraint creation timing-- **Circular Dependencies**: Managing circular dependencies in DDL-- **ALTER TABLE Approach**: Using ALTER TABLE ADD CONSTRAINT for cyclic FKs--## Validation Goals--- Verify accurate detection of cyclic FK relationships-- Validate proper DDL generation using deferred constraints-- Ensure FK constraints are created after table-- Test handling of self-referencing relationships--## Expected Behavior--The migration should create the table first, then add the self-referencing FK constraint using ALTER TABLE ADD CONSTRAINT, avoiding circular dependency issues.diff --git a/backend/plugin/schema/pg/sdl_testdata/dependencies/view_chain/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/dependencies/view_chain/ddl.sqldeleted file mode 100644index e6b666a954..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/dependencies/view_chain/ddl.sql+++ /dev/null@@ -1,21 +0,0 @@-CREATE TABLE "public"."orders" (- "id" serial NOT NULL,- "customer_name" character varying(100) NOT NULL,- "total_amount" numeric(10,2) NOT NULL,- "status" character varying(20) NOT NULL,- "created_at" timestamp(6) without time zone DEFAULT CURRENT_TIMESTAMP,- CONSTRAINT "orders_pkey" PRIMARY KEY ("id")-);-CREATE VIEW "public"."active_orders" AS-SELECT id, customer_name, total_amount, created_at-FROM orders-WHERE status = 'active';-CREATE VIEW "public"."high_value_orders" AS-SELECT id, customer_name, total_amount, created_at-FROM active_orders-WHERE total_amount > 1000;-CREATE VIEW "public"."recent_high_value_orders" AS-SELECT id, customer_name, total_amount, created_at-FROM high_value_orders-WHERE created_at > CURRENT_TIMESTAMP - INTERVAL '30 days';-diff --git a/backend/plugin/schema/pg/sdl_testdata/dependencies/view_chain/diff.json b/backend/plugin/schema/pg/sdl_testdata/dependencies/view_chain/diff.jsondeleted file mode 100644index 4d3637ebb2..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/dependencies/view_chain/diff.json+++ /dev/null@@ -1,39 +0,0 @@-{- "hasDifferences": true,- "summary": "Table changes: 1, View changes: 3",- "tableChanges": 1,- "viewChanges": 3,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 0,- "enumTypeChanges": 0,- "details": {- "tables": [- {- "action": "CREATE",- "schemaName": "public",- "tableName": "orders"- }- ],- "views": [- {- "action": "CREATE",- "schemaName": "public",- "viewName": "active_orders",- "dependsOn": ["orders"]- },- {- "action": "CREATE",- "schemaName": "public",- "viewName": "high_value_orders",- "dependsOn": ["active_orders"]- },- {- "action": "CREATE",- "schemaName": "public",- "viewName": "recent_high_value_orders",- "dependsOn": ["high_value_orders"]- }- ]- }-}diff --git a/backend/plugin/schema/pg/sdl_testdata/dependencies/view_chain/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/dependencies/view_chain/expected_schema.sqldeleted file mode 100644index cbce6c43c9..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/dependencies/view_chain/expected_schema.sql+++ /dev/null@@ -1,22 +0,0 @@-CREATE TABLE public.orders (- id SERIAL PRIMARY KEY,- customer_name VARCHAR(100) NOT NULL,- total_amount DECIMAL(10,2) NOT NULL,- status VARCHAR(20) NOT NULL,- created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP-);--CREATE VIEW public.active_orders AS-SELECT id, customer_name, total_amount, created_at-FROM orders-WHERE status = 'active';--CREATE VIEW public.high_value_orders AS-SELECT id, customer_name, total_amount, created_at-FROM active_orders-WHERE total_amount > 1000;--CREATE VIEW public.recent_high_value_orders AS-SELECT id, customer_name, total_amount, created_at-FROM high_value_orders-WHERE created_at > CURRENT_TIMESTAMP - INTERVAL '30 days';diff --git a/backend/plugin/schema/pg/sdl_testdata/dependencies/view_chain/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/dependencies/view_chain/initial_schema.sqldeleted file mode 100644index 0bd564f903..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/dependencies/view_chain/initial_schema.sql+++ /dev/null@@ -1 +0,0 @@--- Empty initial schemadiff --git a/backend/plugin/schema/pg/sdl_testdata/dependencies/view_chain/test_description.md b/backend/plugin/schema/pg/sdl_testdata/dependencies/view_chain/test_description.mddeleted file mode 100644index 816f9aa3b7..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/dependencies/view_chain/test_description.md+++ /dev/null@@ -1,21 +0,0 @@-# View Chain Test--This test validates the SDL migration handling of views that depend on other views:--## Test Coverage--- **View Dependencies**: Views that depend on other views-- **Dependency Ordering**: Creating views in correct order-- **View Chains**: Multiple levels of view dependencies-- **DDL Ordering**: Ensuring base views are created before dependent views--## Validation Goals--- Verify accurate detection of view dependency chains-- Validate proper ordering of CREATE VIEW statements-- Ensure base tables and views are created before dependent views-- Test handling of multi-level view dependencies--## Expected Behavior--The migration should create tables first, then base views, then dependent views in the correct dependency order.diff --git a/backend/plugin/schema/pg/sdl_testdata/schema_operations/create_multiple_schemas/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/schema_operations/create_multiple_schemas/ddl.sqldeleted file mode 100644index 1c82661c71..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/schema_operations/create_multiple_schemas/ddl.sql+++ /dev/null@@ -1,18 +0,0 @@-CREATE SCHEMA "inventory";-CREATE SCHEMA "sales";-CREATE TABLE "inventory"."products" (- "id" serial NOT NULL,- "name" character varying(100) NOT NULL,- "sku" character varying(50),- "quantity" integer DEFAULT 0,- CONSTRAINT "products_pkey" PRIMARY KEY ("id"),- CONSTRAINT "products_sku_key" UNIQUE ("sku")-);-CREATE TABLE "sales"."customers" (- "id" serial NOT NULL,- "name" character varying(100) NOT NULL,- "email" character varying(255),- CONSTRAINT "customers_pkey" PRIMARY KEY ("id"),- CONSTRAINT "customers_email_key" UNIQUE ("email")-);-diff --git a/backend/plugin/schema/pg/sdl_testdata/schema_operations/create_multiple_schemas/diff.json b/backend/plugin/schema/pg/sdl_testdata/schema_operations/create_multiple_schemas/diff.jsondeleted file mode 100644index 43c2d5bbc2..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/schema_operations/create_multiple_schemas/diff.json+++ /dev/null@@ -1,34 +0,0 @@-{- "hasDifferences": true,- "summary": "Schema changes: 2, Table changes: 2",- "tableChanges": 2,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 2,- "sequenceChanges": 0,- "enumTypeChanges": 0,- "details": {- "schemas": [- {- "action": "CREATE",- "schemaName": "sales"- },- {- "action": "CREATE",- "schemaName": "inventory"- }- ],- "tables": [- {- "action": "CREATE",- "schemaName": "sales",- "tableName": "customers"- },- {- "action": "CREATE",- "schemaName": "inventory",- "tableName": "products"- }- ]- }-}diff --git a/backend/plugin/schema/pg/sdl_testdata/schema_operations/create_multiple_schemas/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/schema_operations/create_multiple_schemas/expected_schema.sqldeleted file mode 100644index fd04094500..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/schema_operations/create_multiple_schemas/expected_schema.sql+++ /dev/null@@ -1,15 +0,0 @@-CREATE SCHEMA sales;-CREATE SCHEMA inventory;--CREATE TABLE sales.customers (- id SERIAL PRIMARY KEY,- name VARCHAR(100) NOT NULL,- email VARCHAR(255) UNIQUE-);--CREATE TABLE inventory.products (- id SERIAL PRIMARY KEY,- name VARCHAR(100) NOT NULL,- sku VARCHAR(50) UNIQUE,- quantity INTEGER DEFAULT 0-);diff --git a/backend/plugin/schema/pg/sdl_testdata/schema_operations/create_multiple_schemas/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/schema_operations/create_multiple_schemas/initial_schema.sqldeleted file mode 100644index 9e10e95c18..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/schema_operations/create_multiple_schemas/initial_schema.sql+++ /dev/null@@ -1 +0,0 @@--- Only public schema exists initiallydiff --git a/backend/plugin/schema/pg/sdl_testdata/schema_operations/create_multiple_schemas/test_description.md b/backend/plugin/schema/pg/sdl_testdata/schema_operations/create_multiple_schemas/test_description.mddeleted file mode 100644index 5fbc177873..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/schema_operations/create_multiple_schemas/test_description.md+++ /dev/null@@ -1,21 +0,0 @@-# Create Multiple Schemas Test--This test validates the SDL migration handling of creating multiple schemas:--## Test Coverage--- **Multiple Schema Creation**: Creating multiple schemas in one migration-- **Schema Ordering**: Proper ordering of CREATE SCHEMA statements-- **Tables in Different Schemas**: Tables created in different schemas-- **Schema Isolation**: Ensuring objects are properly scoped to their schemas--## Validation Goals--- Verify accurate detection of new schemas-- Validate proper CREATE SCHEMA DDL generation-- Ensure tables are created in correct schemas-- Test schema qualification in table DDL--## Expected Behavior--The migration should generate CREATE SCHEMA statements before creating any objects within those schemas, with proper schema qualification for all objects.diff --git a/backend/plugin/schema/pg/sdl_testdata/schema_operations/cross_schema_foreign_key/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/schema_operations/cross_schema_foreign_key/ddl.sqldeleted file mode 100644index 9ba13ea24b..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/schema_operations/cross_schema_foreign_key/ddl.sql+++ /dev/null@@ -1,19 +0,0 @@-CREATE SCHEMA "app";-CREATE SCHEMA "auth";-CREATE TABLE "auth"."users" (- "id" serial NOT NULL,- "username" character varying(50) NOT NULL,- "email" character varying(255) NOT NULL,- CONSTRAINT "users_pkey" PRIMARY KEY ("id"),- CONSTRAINT "users_username_key" UNIQUE ("username"),- CONSTRAINT "users_email_key" UNIQUE ("email")-);-CREATE TABLE "app"."posts" (- "id" serial NOT NULL,- "title" character varying(200) NOT NULL,- "content" text,- "author_id" integer NOT NULL,- CONSTRAINT "posts_pkey" PRIMARY KEY ("id"),- CONSTRAINT "fk_author" FOREIGN KEY ("author_id") REFERENCES "auth"."users"("id") ON DELETE CASCADE-);-diff --git a/backend/plugin/schema/pg/sdl_testdata/schema_operations/cross_schema_foreign_key/diff.json b/backend/plugin/schema/pg/sdl_testdata/schema_operations/cross_schema_foreign_key/diff.jsondeleted file mode 100644index 2997c69538..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/schema_operations/cross_schema_foreign_key/diff.json+++ /dev/null@@ -1,46 +0,0 @@-{- "hasDifferences": true,- "summary": "Schema changes: 2, Table changes: 2",- "tableChanges": 2,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 2,- "sequenceChanges": 0,- "enumTypeChanges": 0,- "details": {- "schemas": [- {- "action": "CREATE",- "schemaName": "auth"- },- {- "action": "CREATE",- "schemaName": "app"- }- ],- "tables": [- {- "action": "CREATE",- "schemaName": "auth",- "tableName": "users"- },- {- "action": "CREATE",- "schemaName": "app",- "tableName": "posts",- "foreignKeyChanges": 1,- "foreignKeys": [- {- "action": "CREATE",- "name": "fk_author",- "columns": ["author_id"],- "referencedSchema": "auth",- "referencedTable": "users",- "referencedColumns": ["id"],- "onDelete": "CASCADE"- }- ]- }- ]- }-}diff --git a/backend/plugin/schema/pg/sdl_testdata/schema_operations/cross_schema_foreign_key/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/schema_operations/cross_schema_foreign_key/expected_schema.sqldeleted file mode 100644index 96b29e1a04..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/schema_operations/cross_schema_foreign_key/expected_schema.sql+++ /dev/null@@ -1,16 +0,0 @@-CREATE SCHEMA auth;-CREATE SCHEMA app;--CREATE TABLE auth.users (- id SERIAL PRIMARY KEY,- username VARCHAR(50) UNIQUE NOT NULL,- email VARCHAR(255) UNIQUE NOT NULL-);--CREATE TABLE app.posts (- id SERIAL PRIMARY KEY,- title VARCHAR(200) NOT NULL,- content TEXT,- author_id INTEGER NOT NULL,- CONSTRAINT fk_author FOREIGN KEY (author_id) REFERENCES auth.users(id) ON DELETE CASCADE-);diff --git a/backend/plugin/schema/pg/sdl_testdata/schema_operations/cross_schema_foreign_key/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/schema_operations/cross_schema_foreign_key/initial_schema.sqldeleted file mode 100644index 9e10e95c18..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/schema_operations/cross_schema_foreign_key/initial_schema.sql+++ /dev/null@@ -1 +0,0 @@--- Only public schema exists initiallydiff --git a/backend/plugin/schema/pg/sdl_testdata/schema_operations/cross_schema_foreign_key/test_description.md b/backend/plugin/schema/pg/sdl_testdata/schema_operations/cross_schema_foreign_key/test_description.mddeleted file mode 100644index 3c3ff70546..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/schema_operations/cross_schema_foreign_key/test_description.md+++ /dev/null@@ -1,21 +0,0 @@-# Cross-Schema Foreign Key Test--This test validates the SDL migration handling of foreign keys across schemas:--## Test Coverage--- **Cross-Schema References**: Foreign key from one schema to another-- **Dependency Ordering**: Ensuring referenced table is created first-- **Schema Qualification**: Proper schema qualification in FK constraints-- **Multi-Schema Coordination**: Multiple schemas with dependencies--## Validation Goals--- Verify accurate detection of cross-schema foreign keys-- Validate proper ordering of DDL statements-- Ensure FK constraints are schema-qualified-- Test dependency resolution across schemas--## Expected Behavior--The migration should create schemas and tables in the correct order, ensuring referenced tables exist before creating foreign keys that reference them, with proper schema qualification in all FK DDL.diff --git a/backend/plugin/schema/pg/sdl_testdata/schema_operations/drop_schema_with_objects/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/schema_operations/drop_schema_with_objects/ddl.sqldeleted file mode 100644index e3ce702aef..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/schema_operations/drop_schema_with_objects/ddl.sql+++ /dev/null@@ -1,4 +0,0 @@-DROP TABLE "temp_data"."logs";-DROP TABLE "temp_data"."sessions";-DROP SCHEMA "temp_data";-diff --git a/backend/plugin/schema/pg/sdl_testdata/schema_operations/drop_schema_with_objects/diff.json b/backend/plugin/schema/pg/sdl_testdata/schema_operations/drop_schema_with_objects/diff.jsondeleted file mode 100644index 35d320b886..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/schema_operations/drop_schema_with_objects/diff.json+++ /dev/null@@ -1,30 +0,0 @@-{- "hasDifferences": true,- "summary": "Schema changes: 1, Table changes: 2",- "tableChanges": 2,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 1,- "sequenceChanges": 0,- "enumTypeChanges": 0,- "details": {- "tables": [- {- "action": "DROP",- "schemaName": "temp_data",- "tableName": "sessions"- },- {- "action": "DROP",- "schemaName": "temp_data",- "tableName": "logs"- }- ],- "schemas": [- {- "action": "DROP",- "schemaName": "temp_data"- }- ]- }-}diff --git a/backend/plugin/schema/pg/sdl_testdata/schema_operations/drop_schema_with_objects/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/schema_operations/drop_schema_with_objects/expected_schema.sqldeleted file mode 100644index f567759824..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/schema_operations/drop_schema_with_objects/expected_schema.sql+++ /dev/null@@ -1 +0,0 @@--- Schema and all objects droppeddiff --git a/backend/plugin/schema/pg/sdl_testdata/schema_operations/drop_schema_with_objects/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/schema_operations/drop_schema_with_objects/initial_schema.sqldeleted file mode 100644index f33c99e098..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/schema_operations/drop_schema_with_objects/initial_schema.sql+++ /dev/null@@ -1,14 +0,0 @@-CREATE SCHEMA temp_data;--CREATE TABLE temp_data.sessions (- id SERIAL PRIMARY KEY,- user_id INTEGER NOT NULL,- token VARCHAR(255) UNIQUE NOT NULL,- expires_at TIMESTAMP NOT NULL-);--CREATE TABLE temp_data.logs (- id SERIAL PRIMARY KEY,- message TEXT,- created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP-);diff --git a/backend/plugin/schema/pg/sdl_testdata/schema_operations/drop_schema_with_objects/test_description.md b/backend/plugin/schema/pg/sdl_testdata/schema_operations/drop_schema_with_objects/test_description.mddeleted file mode 100644index c33f41af56..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/schema_operations/drop_schema_with_objects/test_description.md+++ /dev/null@@ -1,21 +0,0 @@-# Drop Schema with Objects Test--This test validates the SDL migration handling of dropping schemas that contain objects:--## Test Coverage--- **Schema Deletion**: Removing a schema with all its objects-- **Cascading Drops**: Ensuring objects in schema are dropped first-- **Drop Ordering**: Proper ordering of DROP statements-- **Clean Removal**: Complete removal of schema and contents--## Validation Goals--- Verify accurate detection of removed schemas-- Validate proper ordering of DROP statements-- Ensure objects are dropped before schema-- Test CASCADE behavior for schema drops--## Expected Behavior--The migration should generate DROP statements in reverse dependency order, dropping all objects within the schema before dropping the schema itself, or using DROP SCHEMA CASCADE.diff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_constraints/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_constraints/ddl.sqldeleted file mode 100644index 6fba820fa4..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_constraints/ddl.sql+++ /dev/null@@ -1,7 +0,0 @@-ALTER TABLE "public"."employees" ALTER COLUMN "department" SET NOT NULL;-ALTER TABLE "public"."employees" ALTER COLUMN "email" SET NOT NULL;-ALTER TABLE "public"."employees" ALTER COLUMN "name" SET NOT NULL;-ALTER TABLE "public"."employees" ADD CONSTRAINT "employees_email_key" UNIQUE (email);-ALTER TABLE "public"."employees" ADD CONSTRAINT "employees_age_check" CHECK (age >= 18 AND age <= 100);-ALTER TABLE "public"."employees" ADD CONSTRAINT "employees_salary_check" CHECK (salary > 0);-diff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_constraints/diff.json b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_constraints/diff.jsondeleted file mode 100644index b80c7dfb55..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_constraints/diff.json+++ /dev/null@@ -1,104 +0,0 @@-{- "hasDifferences": true,- "summary": "Table changes: 1",- "tableChanges": 1,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 0,- "enumTypeChanges": 0,- "details": {- "tables": [- {- "action": "ALTER",- "schemaName": "public",- "tableName": "employees",- "columnChanges": 3,- "indexChanges": 1,- "constraintChanges": 2,- "foreignKeyChanges": 0,- "columns": [- {- "action": "ALTER",- "name": "department",- "oldColumn": {- "name": "department",- "type": "character varying(50)",- "nullable": true- },- "newColumn": {- "name": "department",- "type": "character varying(50)",- "nullable": false- }- },- {- "action": "ALTER",- "name": "email",- "oldColumn": {- "name": "email",- "type": "character varying(150)",- "nullable": true- },- "newColumn": {- "name": "email",- "type": "character varying(150)",- "nullable": false- }- },- {- "action": "ALTER",- "name": "name",- "oldColumn": {- "name": "name",- "type": "character varying(100)",- "nullable": true- },- "newColumn": {- "name": "name",- "type": "character varying(100)",- "nullable": false- }- }- ],- "indexes": [- {- "action": "CREATE",- "name": "employees_email_key",- "newIndex": {- "name": "employees_email_key",- "type": "btree",- "unique": true,- "expressions": [- "email"- ],- "descending": [- false- ]- }- }- ],- "constraints": [- {- "action": "CREATE",- "name": "employees_age_check",- "newConstraint": {- "name": "employees_age_check",- "type": "CHECK",- "expression": "age \u003e= 18 AND age \u003c= 100"- }- },- {- "action": "CREATE",- "name": "employees_salary_check",- "newConstraint": {- "name": "employees_salary_check",- "type": "CHECK",- "expression": "salary \u003e 0"- }- }- ]- }- ]- }-}\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_constraints/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_constraints/expected_schema.sqldeleted file mode 100644index 9dae553c71..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_constraints/expected_schema.sql+++ /dev/null@@ -1,8 +0,0 @@-CREATE TABLE public.employees (- id SERIAL PRIMARY KEY,- name VARCHAR(100) NOT NULL,- email VARCHAR(150) NOT NULL UNIQUE,- age INTEGER CHECK (age >= 18 AND age <= 100),- salary DECIMAL(10,2) CHECK (salary > 0),- department VARCHAR(50) NOT NULL-);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_constraints/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_constraints/initial_schema.sqldeleted file mode 100644index 2bd39b951f..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_constraints/initial_schema.sql+++ /dev/null@@ -1,8 +0,0 @@-CREATE TABLE public.employees (- id SERIAL PRIMARY KEY,- name VARCHAR(100),- email VARCHAR(150),- age INTEGER,- salary DECIMAL(10,2),- department VARCHAR(50)-);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_constraints/test_description.md b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_constraints/test_description.mddeleted file mode 100644index 436b149123..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_constraints/test_description.md+++ /dev/null@@ -1,22 +0,0 @@-# Add Column Constraints Test--This test validates the SDL migration handling of adding various constraints to columns:--## Test Coverage--- **NOT NULL Constraints**: Adding NOT NULL to nullable columns-- **UNIQUE Constraints**: Adding uniqueness constraints-- **CHECK Constraints**: Adding value validation constraints-- **Default Values**: Adding default value constraints-- **Combined Constraints**: Multiple constraint types on single columns--## Validation Goals--- Verify accurate detection of new column constraints-- Validate proper DDL generation for constraint additions-- Ensure constraint names are generated correctly-- Test constraint validation logic--## Expected Behavior--The migration should generate proper ALTER TABLE statements to add constraints, including ALTER COLUMN SET NOT NULL and ADD CONSTRAINT statements.\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_foreign_keys/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_foreign_keys/ddl.sqldeleted file mode 100644index a8d0f990f2..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_foreign_keys/ddl.sql+++ /dev/null@@ -1,7 +0,0 @@-ALTER TABLE "public"."posts" ALTER COLUMN "author_id" SET NOT NULL;-CREATE INDEX idx_posts_author_id ON public.posts USING btree (author_id);-CREATE INDEX idx_posts_category_id ON public.posts USING btree (category_id);--ALTER TABLE "public"."posts" ADD CONSTRAINT "fk_posts_author" FOREIGN KEY ("author_id") REFERENCES "public"."users" ("id") ON UPDATE NO ACTION ON DELETE CASCADE;-ALTER TABLE "public"."posts" ADD CONSTRAINT "fk_posts_category" FOREIGN KEY ("category_id") REFERENCES "public"."categories" ("id") ON UPDATE NO ACTION ON DELETE SET NULL;-diff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_foreign_keys/diff.json b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_foreign_keys/diff.jsondeleted file mode 100644index 21b0727c81..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_foreign_keys/diff.json+++ /dev/null@@ -1,109 +0,0 @@-{- "hasDifferences": true,- "summary": "Table changes: 1",- "tableChanges": 1,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 0,- "enumTypeChanges": 0,- "details": {- "tables": [- {- "action": "ALTER",- "schemaName": "public",- "tableName": "posts",- "columnChanges": 1,- "indexChanges": 2,- "constraintChanges": 0,- "foreignKeyChanges": 2,- "columns": [- {- "action": "ALTER",- "name": "author_id",- "oldColumn": {- "name": "author_id",- "type": "integer",- "nullable": true- },- "newColumn": {- "name": "author_id",- "type": "integer",- "nullable": false- }- }- ],- "indexes": [- {- "action": "CREATE",- "name": "idx_posts_author_id",- "newIndex": {- "name": "idx_posts_author_id",- "type": "btree",- "unique": false,- "expressions": [- "author_id"- ],- "descending": [- false- ]- }- },- {- "action": "CREATE",- "name": "idx_posts_category_id",- "newIndex": {- "name": "idx_posts_category_id",- "type": "btree",- "unique": false,- "expressions": [- "category_id"- ],- "descending": [- false- ]- }- }- ],- "foreignKeys": [- {- "action": "CREATE",- "name": "fk_posts_author",- "newForeignKey": {- "name": "fk_posts_author",- "columns": [- "author_id"- ],- "referencedSchema": "public",- "referencedTable": "users",- "referencedColumns": [- "id"- ],- "onUpdate": "NO ACTION",- "onDelete": "CASCADE",- "matchType": "SIMPLE"- }- },- {- "action": "CREATE",- "name": "fk_posts_category",- "newForeignKey": {- "name": "fk_posts_category",- "columns": [- "category_id"- ],- "referencedSchema": "public",- "referencedTable": "categories",- "referencedColumns": [- "id"- ],- "onUpdate": "NO ACTION",- "onDelete": "SET NULL",- "matchType": "SIMPLE"- }- }- ]- }- ]- }-}\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_foreign_keys/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_foreign_keys/expected_schema.sqldeleted file mode 100644index 139a69545f..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_foreign_keys/expected_schema.sql+++ /dev/null@@ -1,24 +0,0 @@-CREATE TABLE public.users (- id SERIAL PRIMARY KEY,- username VARCHAR(50) NOT NULL UNIQUE,- email VARCHAR(100) NOT NULL-);--CREATE TABLE public.categories (- id SERIAL PRIMARY KEY,- name VARCHAR(50) NOT NULL UNIQUE-);--CREATE TABLE public.posts (- id SERIAL PRIMARY KEY,- title VARCHAR(200) NOT NULL,- content TEXT,- author_id INTEGER NOT NULL,- category_id INTEGER,- created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,- CONSTRAINT fk_posts_author FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE CASCADE,- CONSTRAINT fk_posts_category FOREIGN KEY (category_id) REFERENCES categories(id) ON DELETE SET NULL-);--CREATE INDEX idx_posts_author_id ON public.posts(author_id);-CREATE INDEX idx_posts_category_id ON public.posts(category_id);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_foreign_keys/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_foreign_keys/initial_schema.sqldeleted file mode 100644index cbe0c51c3a..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_foreign_keys/initial_schema.sql+++ /dev/null@@ -1,19 +0,0 @@-CREATE TABLE public.users (- id SERIAL PRIMARY KEY,- username VARCHAR(50) NOT NULL UNIQUE,- email VARCHAR(100) NOT NULL-);--CREATE TABLE public.categories (- id SERIAL PRIMARY KEY,- name VARCHAR(50) NOT NULL UNIQUE-);--CREATE TABLE public.posts (- id SERIAL PRIMARY KEY,- title VARCHAR(200) NOT NULL,- content TEXT,- author_id INTEGER,- category_id INTEGER,- created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP-)\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_foreign_keys/test_description.md b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_foreign_keys/test_description.mddeleted file mode 100644index 5106fbe369..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_foreign_keys/test_description.md+++ /dev/null@@ -1,22 +0,0 @@-# Add Column Foreign Keys Test--This test validates the SDL migration handling of adding foreign key constraints to columns:--## Test Coverage--- **Basic Foreign Keys**: Simple references to primary keys-- **CASCADE Actions**: ON DELETE CASCADE, ON UPDATE CASCADE-- **SET NULL Actions**: ON DELETE SET NULL, ON UPDATE SET NULL-- **Multiple Foreign Keys**: Multiple references in same table-- **Self-References**: Foreign keys referencing the same table--## Validation Goals--- Verify accurate detection of new foreign key constraints-- Validate proper ALTER TABLE ADD CONSTRAINT DDL generation-- Ensure referential actions are correctly specified-- Test constraint naming and dependency resolution--## Expected Behavior--The migration should generate proper ALTER TABLE ADD CONSTRAINT statements with correct references and cascade actions.\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_indexes/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_indexes/ddl.sqldeleted file mode 100644index e41f1a7ea4..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_indexes/ddl.sql+++ /dev/null@@ -1,8 +0,0 @@-CREATE INDEX idx_posts_author_id ON public.posts USING btree (author_id);-CREATE INDEX idx_posts_author_status ON public.posts USING btree (author_id, status);-CREATE INDEX idx_posts_category ON public.posts USING btree (category);-CREATE INDEX idx_posts_created_at ON public.posts USING btree (created_at);-CREATE INDEX idx_posts_published ON public.posts USING btree (created_at) WHERE ((status)::text = 'published'::text);-CREATE INDEX idx_posts_status ON public.posts USING btree (status);-CREATE INDEX idx_posts_tags ON public.posts USING gin (tags);-diff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_indexes/diff.json b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_indexes/diff.jsondeleted file mode 100644index 23e0c192b2..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_indexes/diff.json+++ /dev/null@@ -1,132 +0,0 @@-{- "hasDifferences": true,- "summary": "Table changes: 1",- "tableChanges": 1,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 0,- "enumTypeChanges": 0,- "details": {- "tables": [- {- "action": "ALTER",- "schemaName": "public",- "tableName": "posts",- "columnChanges": 0,- "indexChanges": 7,- "constraintChanges": 0,- "foreignKeyChanges": 0,- "indexes": [- {- "action": "CREATE",- "name": "idx_posts_author_id",- "newIndex": {- "name": "idx_posts_author_id",- "type": "btree",- "unique": false,- "expressions": [- "author_id"- ],- "descending": [- false- ]- }- },- {- "action": "CREATE",- "name": "idx_posts_author_status",- "newIndex": {- "name": "idx_posts_author_status",- "type": "btree",- "unique": false,- "expressions": [- "author_id",- "status"- ],- "descending": [- false,- false- ]- }- },- {- "action": "CREATE",- "name": "idx_posts_category",- "newIndex": {- "name": "idx_posts_category",- "type": "btree",- "unique": false,- "expressions": [- "category"- ],- "descending": [- false- ]- }- },- {- "action": "CREATE",- "name": "idx_posts_created_at",- "newIndex": {- "name": "idx_posts_created_at",- "type": "btree",- "unique": false,- "expressions": [- "created_at"- ],- "descending": [- false- ]- }- },- {- "action": "CREATE",- "name": "idx_posts_published",- "newIndex": {- "name": "idx_posts_published",- "type": "btree",- "unique": false,- "expressions": [- "created_at"- ],- "descending": [- false- ]- }- },- {- "action": "CREATE",- "name": "idx_posts_status",- "newIndex": {- "name": "idx_posts_status",- "type": "btree",- "unique": false,- "expressions": [- "status"- ],- "descending": [- false- ]- }- },- {- "action": "CREATE",- "name": "idx_posts_tags",- "newIndex": {- "name": "idx_posts_tags",- "type": "gin",- "unique": false,- "expressions": [- "tags"- ],- "descending": [- false- ]- }- }- ]- }- ]- }-}\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_indexes/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_indexes/expected_schema.sqldeleted file mode 100644index cffd9738c8..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_indexes/expected_schema.sql+++ /dev/null@@ -1,18 +0,0 @@-CREATE TABLE public.posts (- id SERIAL PRIMARY KEY,- title VARCHAR(200) NOT NULL,- content TEXT,- author_id INTEGER,- created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,- category VARCHAR(50),- tags TEXT[],- status VARCHAR(20) DEFAULT 'draft'-);--CREATE INDEX idx_posts_author_id ON public.posts(author_id);-CREATE INDEX idx_posts_created_at ON public.posts(created_at);-CREATE INDEX idx_posts_category ON public.posts(category);-CREATE INDEX idx_posts_status ON public.posts(status);-CREATE INDEX idx_posts_author_status ON public.posts(author_id, status);-CREATE INDEX idx_posts_published ON public.posts(created_at) WHERE ((status)::text = 'published'::text);-CREATE INDEX idx_posts_tags ON public.posts USING gin(tags);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_indexes/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_indexes/initial_schema.sqldeleted file mode 100644index 7f1596c142..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_indexes/initial_schema.sql+++ /dev/null@@ -1,10 +0,0 @@-CREATE TABLE public.posts (- id SERIAL PRIMARY KEY,- title VARCHAR(200) NOT NULL,- content TEXT,- author_id INTEGER,- created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,- category VARCHAR(50),- tags TEXT[],- status VARCHAR(20) DEFAULT 'draft'-);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_indexes/test_description.md b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_indexes/test_description.mddeleted file mode 100644index 4567342dfe..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_column_indexes/test_description.md+++ /dev/null@@ -1,22 +0,0 @@-# Add Column Indexes Test--This test validates the SDL migration handling of adding indexes on existing columns:--## Test Coverage--- **Simple Indexes**: Basic B-tree indexes on single columns-- **Composite Indexes**: Multi-column indexes-- **Partial Indexes**: Indexes with WHERE clauses-- **Specialized Indexes**: GIN indexes for arrays and text search-- **Unique Indexes**: Unique constraint indexes--## Validation Goals--- Verify accurate detection of new indexes-- Validate proper CREATE INDEX DDL generation-- Ensure index types and expressions are correct-- Test partial index conditions and composite column ordering--## Expected Behavior--The migration should generate proper CREATE INDEX statements with correct index types, expressions, and conditions.\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_simple_columns/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_simple_columns/ddl.sqldeleted file mode 100644index 3b934d6c1b..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_simple_columns/ddl.sql+++ /dev/null@@ -1,5 +0,0 @@-ALTER TABLE "public"."products" ADD COLUMN "category" character varying(50) DEFAULT 'general';-ALTER TABLE "public"."products" ADD COLUMN "created_at" timestamp(6) without time zone DEFAULT CURRENT_TIMESTAMP;-ALTER TABLE "public"."products" ADD COLUMN "description" text;-ALTER TABLE "public"."products" ADD COLUMN "is_featured" boolean DEFAULT false;-diff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_simple_columns/diff.json b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_simple_columns/diff.jsondeleted file mode 100644index cf51ba19f1..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_simple_columns/diff.json+++ /dev/null@@ -1,64 +0,0 @@-{- "hasDifferences": true,- "summary": "Table changes: 1",- "tableChanges": 1,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 0,- "enumTypeChanges": 0,- "details": {- "tables": [- {- "action": "ALTER",- "schemaName": "public",- "tableName": "products",- "columnChanges": 4,- "indexChanges": 0,- "constraintChanges": 0,- "foreignKeyChanges": 0,- "columns": [- {- "action": "CREATE",- "name": "category",- "newColumn": {- "name": "category",- "type": "character varying(50)",- "nullable": true,- "defaultValue": "'general'"- }- },- {- "action": "CREATE",- "name": "created_at",- "newColumn": {- "name": "created_at",- "type": "timestamp(6) without time zone",- "nullable": true,- "defaultValue": "CURRENT_TIMESTAMP"- }- },- {- "action": "CREATE",- "name": "description",- "newColumn": {- "name": "description",- "type": "text",- "nullable": true- }- },- {- "action": "CREATE",- "name": "is_featured",- "newColumn": {- "name": "is_featured",- "type": "boolean",- "nullable": true,- "defaultValue": "false"- }- }- ]- }- ]- }-}\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_simple_columns/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_simple_columns/expected_schema.sqldeleted file mode 100644index 855abb82ac..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_simple_columns/expected_schema.sql+++ /dev/null@@ -1,9 +0,0 @@-CREATE TABLE public.products (- id SERIAL PRIMARY KEY,- name VARCHAR(100) NOT NULL,- price DECIMAL(10,2),- description TEXT,- category VARCHAR(50) DEFAULT 'general',- is_featured BOOLEAN DEFAULT false,- created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP-);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_simple_columns/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_simple_columns/initial_schema.sqldeleted file mode 100644index 1362b39560..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_simple_columns/initial_schema.sql+++ /dev/null@@ -1,5 +0,0 @@-CREATE TABLE public.products (- id SERIAL PRIMARY KEY,- name VARCHAR(100) NOT NULL,- price DECIMAL(10,2)-);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_simple_columns/test_description.md b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_simple_columns/test_description.mddeleted file mode 100644index 3c937e024b..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/add_simple_columns/test_description.md+++ /dev/null@@ -1,21 +0,0 @@-# Add Simple Columns Test--This test validates the SDL migration handling of adding simple columns to existing tables:--## Test Coverage--- **Column Addition**: Adding columns with various data types-- **Default Values**: Columns with default values-- **Nullable Columns**: Adding nullable and NOT NULL columns-- **Basic Data Types**: VARCHAR, INTEGER, BOOLEAN, TIMESTAMP, TEXT--## Validation Goals--- Verify accurate detection of new columns-- Validate proper DDL generation for column additions-- Ensure column constraints and defaults are applied correctly-- Test column ordering is preserved--## Expected Behavior--The migration should generate proper ALTER TABLE ADD COLUMN statements for each new column while preserving existing table structure and data integrity.\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/complex_column_operations/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/complex_column_operations/ddl.sqldeleted file mode 100644index 485364f1ef..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/complex_column_operations/ddl.sql+++ /dev/null@@ -1,22 +0,0 @@-DROP INDEX IF EXISTS "public"."idx_products_category_name";-DROP INDEX IF EXISTS "public"."idx_products_temp";-ALTER TABLE "public"."products" DROP COLUMN IF EXISTS "old_name";-ALTER TABLE "public"."products" DROP COLUMN IF EXISTS "temp_field";-ALTER TABLE "public"."products" DROP COLUMN IF EXISTS "category_name";--ALTER TABLE "public"."products" ADD COLUMN "category_id" integer NOT NULL;-ALTER TABLE "public"."products" ADD COLUMN "created_at" timestamp(6) without time zone DEFAULT CURRENT_TIMESTAMP;-ALTER TABLE "public"."products" ADD COLUMN "description" text;-ALTER TABLE "public"."products" ADD COLUMN "is_active" boolean DEFAULT true;-ALTER TABLE "public"."products" ADD COLUMN "name" character varying(200) NOT NULL;-ALTER TABLE "public"."products" ADD COLUMN "updated_at" timestamp(6) without time zone DEFAULT CURRENT_TIMESTAMP;-ALTER TABLE "public"."products" ALTER COLUMN "price" TYPE numeric(10,2);-ALTER TABLE "public"."products" ALTER COLUMN "price" SET NOT NULL;-CREATE INDEX idx_products_active ON public.products USING btree (is_active) WHERE is_active = true;-CREATE INDEX idx_products_category_id ON public.products USING btree (category_id);-CREATE INDEX idx_products_name ON public.products USING btree (name);-CREATE INDEX idx_products_price ON public.products USING btree (price);-ALTER TABLE "public"."products" ADD CONSTRAINT "products_price_check" CHECK (price > 0);--ALTER TABLE "public"."products" ADD CONSTRAINT "fk_products_category" FOREIGN KEY ("category_id") REFERENCES "public"."categories" ("id") ON UPDATE NO ACTION ON DELETE RESTRICT;-diff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/complex_column_operations/diff.json b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/complex_column_operations/diff.jsondeleted file mode 100644index 688be8708d..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/complex_column_operations/diff.json+++ /dev/null@@ -1,246 +0,0 @@-{- "hasDifferences": true,- "summary": "Table changes: 1",- "tableChanges": 1,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 0,- "enumTypeChanges": 0,- "details": {- "tables": [- {- "action": "ALTER",- "schemaName": "public",- "tableName": "products",- "columnChanges": 10,- "indexChanges": 6,- "constraintChanges": 1,- "foreignKeyChanges": 1,- "columns": [- {- "action": "CREATE",- "name": "category_id",- "newColumn": {- "name": "category_id",- "type": "integer",- "nullable": false- }- },- {- "action": "DROP",- "name": "old_name",- "oldColumn": {- "name": "old_name",- "type": "character varying(50)",- "nullable": true- }- },- {- "action": "DROP",- "name": "temp_field",- "oldColumn": {- "name": "temp_field",- "type": "text",- "nullable": true- }- },- {- "action": "DROP",- "name": "category_name",- "oldColumn": {- "name": "category_name",- "type": "character varying(30)",- "nullable": true- }- },- {- "action": "CREATE",- "name": "created_at",- "newColumn": {- "name": "created_at",- "type": "timestamp(6) without time zone",- "nullable": true,- "defaultValue": "CURRENT_TIMESTAMP"- }- },- {- "action": "CREATE",- "name": "description",- "newColumn": {- "name": "description",- "type": "text",- "nullable": true- }- },- {- "action": "CREATE",- "name": "is_active",- "newColumn": {- "name": "is_active",- "type": "boolean",- "nullable": true,- "defaultValue": "true"- }- },- {- "action": "CREATE",- "name": "name",- "newColumn": {- "name": "name",- "type": "character varying(200)",- "nullable": false- }- },- {- "action": "ALTER",- "name": "price",- "oldColumn": {- "name": "price",- "type": "integer",- "nullable": true- },- "newColumn": {- "name": "price",- "type": "numeric(10,2)",- "nullable": false- }- },- {- "action": "CREATE",- "name": "updated_at",- "newColumn": {- "name": "updated_at",- "type": "timestamp(6) without time zone",- "nullable": true,- "defaultValue": "CURRENT_TIMESTAMP"- }- }- ],- "indexes": [- {- "action": "CREATE",- "name": "idx_products_active",- "newIndex": {- "name": "idx_products_active",- "type": "btree",- "unique": false,- "expressions": [- "is_active"- ],- "descending": [- false- ]- }- },- {- "action": "CREATE",- "name": "idx_products_category_id",- "newIndex": {- "name": "idx_products_category_id",- "type": "btree",- "unique": false,- "expressions": [- "category_id"- ],- "descending": [- false- ]- }- },- {- "action": "DROP",- "name": "idx_products_category_name",- "oldIndex": {- "name": "idx_products_category_name",- "type": "btree",- "unique": false,- "expressions": [- "category_name"- ],- "descending": [- false- ]- }- },- {- "action": "CREATE",- "name": "idx_products_name",- "newIndex": {- "name": "idx_products_name",- "type": "btree",- "unique": false,- "expressions": [- "name"- ],- "descending": [- false- ]- }- },- {- "action": "CREATE",- "name": "idx_products_price",- "newIndex": {- "name": "idx_products_price",- "type": "btree",- "unique": false,- "expressions": [- "price"- ],- "descending": [- false- ]- }- },- {- "action": "DROP",- "name": "idx_products_temp",- "oldIndex": {- "name": "idx_products_temp",- "type": "btree",- "unique": false,- "expressions": [- "temp_field"- ],- "descending": [- false- ]- }- }- ],- "constraints": [- {- "action": "CREATE",- "name": "products_price_check",- "newConstraint": {- "name": "products_price_check",- "type": "CHECK",- "expression": "price \u003e 0"- }- }- ],- "foreignKeys": [- {- "action": "CREATE",- "name": "fk_products_category",- "newForeignKey": {- "name": "fk_products_category",- "columns": [- "category_id"- ],- "referencedSchema": "public",- "referencedTable": "categories",- "referencedColumns": [- "id"- ],- "onUpdate": "NO ACTION",- "onDelete": "RESTRICT",- "matchType": "SIMPLE"- }- }- ]- }- ]- }-}\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/complex_column_operations/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/complex_column_operations/expected_schema.sqldeleted file mode 100644index 94f46f371c..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/complex_column_operations/expected_schema.sql+++ /dev/null@@ -1,21 +0,0 @@-CREATE TABLE public.categories (- id SERIAL PRIMARY KEY,- name VARCHAR(50) NOT NULL UNIQUE-);--CREATE TABLE public.products (- id SERIAL PRIMARY KEY,- name VARCHAR(200) NOT NULL,- price DECIMAL(10,2) NOT NULL CHECK (price > 0),- description TEXT,- category_id INTEGER NOT NULL,- is_active BOOLEAN DEFAULT true,- created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,- updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,- CONSTRAINT fk_products_category FOREIGN KEY (category_id) REFERENCES categories(id) ON DELETE RESTRICT-);--CREATE INDEX idx_products_name ON public.products(name);-CREATE INDEX idx_products_category_id ON public.products(category_id);-CREATE INDEX idx_products_active ON public.products(is_active) WHERE is_active = true;-CREATE INDEX idx_products_price ON public.products(price);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/complex_column_operations/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/complex_column_operations/initial_schema.sqldeleted file mode 100644index 293033c331..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/complex_column_operations/initial_schema.sql+++ /dev/null@@ -1,15 +0,0 @@-CREATE TABLE public.products (- id SERIAL PRIMARY KEY,- old_name VARCHAR(50),- price INTEGER,- temp_field TEXT,- category_name VARCHAR(30)-);--CREATE TABLE public.categories (- id SERIAL PRIMARY KEY,- name VARCHAR(50) NOT NULL UNIQUE-);--CREATE INDEX idx_products_temp ON public.products(temp_field);-CREATE INDEX idx_products_category_name ON public.products(category_name);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/complex_column_operations/test_description.md b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/complex_column_operations/test_description.mddeleted file mode 100644index 555864a1d7..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/complex_column_operations/test_description.md+++ /dev/null@@ -1,22 +0,0 @@-# Complex Column Operations Test--This test validates the SDL migration handling of complex scenarios combining multiple column operations:--## Test Coverage--- **Mixed Operations**: Adding, modifying, and dropping columns in same migration-- **Type Changes with Constraints**: Changing types while adding constraints-- **Dependency Management**: Handling indexes and foreign keys during column changes-- **Column Renaming**: Simulating column renames through drop/add operations-- **Data Preservation**: Ensuring operations preserve data integrity--## Validation Goals--- Verify proper operation ordering and dependency resolution-- Validate complex DDL generation with multiple ALTER statements-- Ensure constraint and index management during column changes-- Test migration safety and data integrity--## Expected Behavior--The migration should generate properly ordered DDL statements that handle dependencies correctly while preserving data integrity throughout the transformation.\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/drop_columns/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/drop_columns/ddl.sqldeleted file mode 100644index 84afb93f3e..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/drop_columns/ddl.sql+++ /dev/null@@ -1,7 +0,0 @@-DROP INDEX IF EXISTS "public"."idx_products_legacy_data";-DROP INDEX IF EXISTS "public"."idx_products_old_price";-ALTER TABLE "public"."products" DROP COLUMN IF EXISTS "old_price";-ALTER TABLE "public"."products" DROP COLUMN IF EXISTS "deprecated_field1";-ALTER TABLE "public"."products" DROP COLUMN IF EXISTS "deprecated_field2";-ALTER TABLE "public"."products" DROP COLUMN IF EXISTS "legacy_data";-diff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/drop_columns/diff.json b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/drop_columns/diff.jsondeleted file mode 100644index e6dd2ea33d..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/drop_columns/diff.json+++ /dev/null@@ -1,93 +0,0 @@-{- "hasDifferences": true,- "summary": "Table changes: 1",- "tableChanges": 1,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 0,- "enumTypeChanges": 0,- "details": {- "tables": [- {- "action": "ALTER",- "schemaName": "public",- "tableName": "products",- "columnChanges": 4,- "indexChanges": 2,- "constraintChanges": 0,- "foreignKeyChanges": 0,- "columns": [- {- "action": "DROP",- "name": "old_price",- "oldColumn": {- "name": "old_price",- "type": "numeric(10,2)",- "nullable": true- }- },- {- "action": "DROP",- "name": "deprecated_field1",- "oldColumn": {- "name": "deprecated_field1",- "type": "text",- "nullable": true- }- },- {- "action": "DROP",- "name": "deprecated_field2",- "oldColumn": {- "name": "deprecated_field2",- "type": "integer",- "nullable": true- }- },- {- "action": "DROP",- "name": "legacy_data",- "oldColumn": {- "name": "legacy_data",- "type": "jsonb",- "nullable": true- }- }- ],- "indexes": [- {- "action": "DROP",- "name": "idx_products_legacy_data",- "oldIndex": {- "name": "idx_products_legacy_data",- "type": "gin",- "unique": false,- "expressions": [- "legacy_data"- ],- "descending": [- false- ]- }- },- {- "action": "DROP",- "name": "idx_products_old_price",- "oldIndex": {- "name": "idx_products_old_price",- "type": "btree",- "unique": false,- "expressions": [- "old_price"- ],- "descending": [- false- ]- }- }- ]- }- ]- }-}\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/drop_columns/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/drop_columns/expected_schema.sqldeleted file mode 100644index 497df097a2..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/drop_columns/expected_schema.sql+++ /dev/null@@ -1,6 +0,0 @@-CREATE TABLE public.products (- id SERIAL PRIMARY KEY,- name VARCHAR(100) NOT NULL,- description TEXT,- category VARCHAR(50)-);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/drop_columns/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/drop_columns/initial_schema.sqldeleted file mode 100644index a18cf92cc7..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/drop_columns/initial_schema.sql+++ /dev/null@@ -1,13 +0,0 @@-CREATE TABLE public.products (- id SERIAL PRIMARY KEY,- name VARCHAR(100) NOT NULL,- old_price DECIMAL(10,2),- deprecated_field1 TEXT,- description TEXT,- deprecated_field2 INTEGER,- category VARCHAR(50),- legacy_data JSONB-);--CREATE INDEX idx_products_old_price ON public.products(old_price);-CREATE INDEX idx_products_legacy_data ON public.products USING gin(legacy_data);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/drop_columns/test_description.md b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/drop_columns/test_description.mddeleted file mode 100644index b12987eff3..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/drop_columns/test_description.md+++ /dev/null@@ -1,21 +0,0 @@-# Drop Columns Test--This test validates the SDL migration handling of dropping columns from existing tables:--## Test Coverage--- **Single Column Drop**: Removing individual columns-- **Multiple Column Drops**: Removing several columns at once-- **Various Data Types**: Dropping columns with different data types-- **Dependency Handling**: Ensuring constraints and indexes are properly handled--## Validation Goals--- Verify accurate detection of dropped columns-- Validate proper DDL generation for DROP COLUMN statements-- Ensure dependent indexes and constraints are dropped-- Test table structure integrity after column removal--## Expected Behavior--The migration should generate proper ALTER TABLE DROP COLUMN statements while automatically handling dependent objects like indexes and constraints.\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/modify_column_types/ddl.sql b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/modify_column_types/ddl.sqldeleted file mode 100644index 82cbe49072..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/modify_column_types/ddl.sql+++ /dev/null@@ -1,5 +0,0 @@-ALTER TABLE "public"."customers" ALTER COLUMN "age" TYPE integer;-ALTER TABLE "public"."customers" ALTER COLUMN "balance" TYPE bigint;-ALTER TABLE "public"."customers" ALTER COLUMN "is_active" SET DEFAULT true;-ALTER TABLE "public"."customers" ALTER COLUMN "name" TYPE character varying(200);-diff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/modify_column_types/diff.json b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/modify_column_types/diff.jsondeleted file mode 100644index 45c9feab86..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/modify_column_types/diff.json+++ /dev/null@@ -1,82 +0,0 @@-{- "hasDifferences": true,- "summary": "Table changes: 1",- "tableChanges": 1,- "viewChanges": 0,- "functionChanges": 0,- "schemaChanges": 0,- "sequenceChanges": 0,- "enumTypeChanges": 0,- "details": {- "tables": [- {- "action": "ALTER",- "schemaName": "public",- "tableName": "customers",- "columnChanges": 4,- "indexChanges": 0,- "constraintChanges": 0,- "foreignKeyChanges": 0,- "columns": [- {- "action": "ALTER",- "name": "age",- "oldColumn": {- "name": "age",- "type": "smallint",- "nullable": true- },- "newColumn": {- "name": "age",- "type": "integer",- "nullable": true- }- },- {- "action": "ALTER",- "name": "balance",- "oldColumn": {- "name": "balance",- "type": "integer",- "nullable": true- },- "newColumn": {- "name": "balance",- "type": "bigint",- "nullable": true- }- },- {- "action": "ALTER",- "name": "is_active",- "oldColumn": {- "name": "is_active",- "type": "boolean",- "nullable": true- },- "newColumn": {- "name": "is_active",- "type": "boolean",- "nullable": true,- "defaultValue": "true"- }- },- {- "action": "ALTER",- "name": "name",- "oldColumn": {- "name": "name",- "type": "character varying(50)",- "nullable": false- },- "newColumn": {- "name": "name",- "type": "character varying(200)",- "nullable": false- }- }- ]- }- ]- }-}\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/modify_column_types/expected_schema.sql b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/modify_column_types/expected_schema.sqldeleted file mode 100644index 2321d55bbf..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/modify_column_types/expected_schema.sql+++ /dev/null@@ -1,8 +0,0 @@-CREATE TABLE public.customers (- id SERIAL PRIMARY KEY,- name VARCHAR(200) NOT NULL,- age INTEGER,- balance BIGINT,- is_active BOOLEAN DEFAULT true,- notes TEXT-);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/modify_column_types/initial_schema.sql b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/modify_column_types/initial_schema.sqldeleted file mode 100644index 9b5849b312..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/modify_column_types/initial_schema.sql+++ /dev/null@@ -1,8 +0,0 @@-CREATE TABLE public.customers (- id SERIAL PRIMARY KEY,- name VARCHAR(50) NOT NULL,- age SMALLINT,- balance INTEGER,- is_active BOOLEAN,- notes TEXT-);\ No newline at end of filediff --git a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/modify_column_types/test_description.md b/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/modify_column_types/test_description.mddeleted file mode 100644index 81eadf1bf5..0000000000--- a/backend/plugin/schema/pg/sdl_testdata/table_operations/column_operations/modify_column_types/test_description.md+++ /dev/null@@ -1,21 +0,0 @@-# Modify Column Types Test--This test validates the SDL migration handling of modifying column data types:--## Test Coverage--- **Type Changes**: VARCHAR size changes, numeric precision changes-- **Type Conversions**: SMALLINT to INTEGER, INTEGER to BIGINT-- **Nullability Changes**: Adding/removing NOT NULL constraints-- **Default Value Changes**: Adding, modifying, and removing default values--## Validation Goals--- Verify accurate detection of column type modifications-- Validate proper DDL generation for ALTER COLUMN statements-- Ensure data compatibility during type conversions-- Test constraint changes are applied correctly--## Expected Behavior--The migration should generate proper ALTER TABLE ALTER COLUMN statements with appropriate type casting and constraint modifications.\ No newline at end of filediff --git a/backend/plugin/schema/pg/testdata/get_design_schema.yaml b/backend/plugin/schema/pg/testdata/get_design_schema.yamldeleted file mode 100644index 3580931aeb..0000000000--- a/backend/plugin/schema/pg/testdata/get_design_schema.yaml+++ /dev/null@@ -1,198 +0,0 @@-- baseline: |-- CREATE TABLE public."t" (- "a" int,- CONSTRAINT t_a_check CHECK ("a" > 0)- );- CREATE TABLE public."x" (- "a" int,- CONSTRAINT x_a_check CHECK ("a" > 0)- );- COMMENT ON COLUMN public.t.a IS 'this is a comment';- COMMENT ON TABLE public.t IS 'hello';- ALTER TABLE public."t" ADD CONSTRAINT fk_t_a_t2_b FOREIGN KEY ("a") REFERENCES public."t2" ("b");- CREATE TABLE public."t3" (- "a" int- );- CREATE TABLE public.t4 (- a int,- c int,- d int,- e char(10) NOT NULL DEFAULT 'NULL'- );- COMMENT ON COLUMN public.t4.c IS 'comment with ''; test escape';- ALTER TABLE public.t4 ADD CONSTRAINT pk_t4_a_c_d PRIMARY KEY (a, c, d);- ALTER TABLE public.t4 ADD CONSTRAINT fk_t4_a_t2_b FOREIGN KEY (a) REFERENCES public.t2 (b);- CREATE INDEX idx_t4_d ON public.t4 USING btree (d);- target: |-- {- "schemas": [- {- "name": "s1",- "tables": [- {- "name": "t",- "columns": [- {- "name": "a",- "position": 0,- "nullable": false,- "type": "int"- }- ]- }- ]- },- {- "name": "public",- "tables": [- {- "name": "t",- "columns": [- {- "name": "a",- "nullable": false,- "type": "integer"- }- ],- "indexes": [],- "foreignKeys": []- },- {- "name": "t4",- "columns": [- {- "name": "a",- "defaultExpression": "'default value'",- "nullable": false,- "type": "varchar(10)",- "comment": "this is comment', aha"- },- {- "name": "b",- "nullable": false,- "type": "char(10)"- },- {- "name": "c",- "nullable": false,- "type": "int",- "comment": "comment with '; test escape"- },- {- "name": "e",- "nullable": true,- "type": "int"- }- ],- "indexes": [- {- "name": "pk_t4_a_c_d",- "expressions": [- "a",- "b",- "c"- ],- "unique": true,- "primary": true,- "visible": true- }- ],- "foreignKeys": [- {- "name": "fk_t4_a_t2_b",- "columns": [- "b"- ],- "referencedSchema": "public",- "referencedTable": "t2",- "referencedColumns": [- "b"- ]- }- ]- },- {- "name": "t2",- "columns": [- {- "name": "b",- "nullable": true,- "type": "int"- },- {- "name": "a",- "nullable": true,- "type": "int"- }- ],- "indexes": [- {- "name": "PRIMARY",- "expressions": [- "b"- ],- "unique": true,- "primary": true,- "visible": true- }- ],- "foreignKeys": [- {- "name": "fk_t2_b_t4_b",- "columns": [- "b"- ],- "referencedSchema": "public",- "referencedTable": "t4",- "referencedColumns": [- "b"- ]- }- ],- "comment": "hello"- }- ]- }- ]- }- result: |+- CREATE SCHEMA "s1";-- CREATE TABLE "s1"."t" (- "a" int NOT NULL- );-- CREATE TABLE "public"."t" (- "a" integer NOT NULL- );-- CREATE TABLE "public"."t4" (- "a" varchar(10) NOT NULL DEFAULT 'default value',- "b" char(10) NOT NULL,- "c" int NOT NULL,- "e" int NULL- );- ALTER TABLE ONLY "public"."t4"- ADD CONSTRAINT "pk_t4_a_c_d" PRIMARY KEY ("a", "b", "c");-- ALTER TABLE ONLY "public"."t4"- ADD CONSTRAINT "fk_t4_a_t2_b" FOREIGN KEY ("b") REFERENCES "public"."t2"("b");--- COMMENT ON COLUMN "public"."t4"."a" IS 'this is comment'', aha';-- COMMENT ON COLUMN "public"."t4"."c" IS 'comment with ''; test escape';-- CREATE TABLE "public"."t2" (- "b" int NULL,- "a" int NULL- );- ALTER TABLE ONLY "public"."t2"- ADD CONSTRAINT "PRIMARY" PRIMARY KEY ("b");-- ALTER TABLE ONLY "public"."t2"- ADD CONSTRAINT "fk_t2_b_t4_b" FOREIGN KEY ("b") REFERENCES "public"."t4"("b");--- COMMENT ON TABLE "public"."t2" IS 'hello';-diff --git a/backend/plugin/schema/tidb/testdata/get_design_schema.yaml b/backend/plugin/schema/tidb/testdata/get_design_schema.yamldeleted file mode 100644index 41ffa0e9e0..0000000000--- a/backend/plugin/schema/tidb/testdata/get_design_schema.yaml+++ /dev/null@@ -1,497 +0,0 @@-- target: |-- {- "schemas": [- {- "tables": [- {- "name": "t",- "columns": [- {- "name": "a",- "type": "int"- },- {- "name": "b",- "type": "varchar(255)"- },- {- "name": "c",- "type": "timestamp(3)",- "defaultExpression": "CURRENT_TIMESTAMP(3)",- "onUpdate": "CURRENT_TIMESTAMP(3)"- },- {- "name": "d",- "type": "timestamp",- "defaultExpression": "CURRENT_TIMESTAMP",- "onUpdate": "CURRENT_TIMESTAMP"- },- {- "name": "e",- "type": "timestamp",- "defaultExpression": "CURRENT_TIMESTAMP"- }- ],- "indexes": [- {- "name": "idx_t_b",- "expressions": [- "b"- ],- "keyLength": [- "20"- ],- "comment": "this is comment with"- },- {- "name": "idx_t_b2",- "expressions": [- "b"- ],- "keyLength": [- "20"- ]- }- ]- }- ],- "views": [- {- "name": "v1",- "comment": "VIEW",- "definition": "select `t`.`id` AS `id` from `t`"- },- {- "name": "v2",- "comment": "VIEW",- "definition": "select (`t`.`id` + 1) AS `id + 1` from `t`"- }- ]- }- ]- }- result: |- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `a` int NOT NULL,- `b` varchar(255) NOT NULL,- `c` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3),- `d` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,- `e` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,- KEY `idx_t_b` (`b`(20)),- KEY `idx_t_b2` (`b`(20))- );-- --- -- View structure for `v1`- --- CREATE OR REPLACE VIEW `v1` AS select `t`.`id` AS `id` from `t`;-- --- -- View structure for `v2`- --- CREATE OR REPLACE VIEW `v2` AS select (`t`.`id` + 1) AS `id + 1` from `t`;-- target: |-- {- "schemas": [- {- "tables": [- {- "name": "rds",- "columns": [- {- "name": "id",- "type": "bigint(20)",- "comment": "ID"- },- {- "name": "binlog_format",- "nullable": true,- "type": "enum('ROW','MIXED','STATEMENT','')"- },- {- "name": "x1",- "nullable": true,- "type": "blob"- },- {- "name": "c1",- "nullable": true,- "type": "int",- "defaultExpression": "AUTO_INCREMENT"- }- ],- "indexes": [- ],- "comment": "hello"- },- {- "name": "users",- "columns": [- {- "name": "id",- "type": "int",- "comment": "ID"- },- {- "name": "age",- "nullable": true,- "type": "varbinary(500)"- },- {- "name": "name",- "nullable": true,- "type": "binary(10)"- }- ],- "indexes": [- {- "name": "PRIMARY",- "expressions": [- "id"- ],- "unique": true,- "primary": true,- "visible": true- }- ],- "comment": "hello"- },- {- "name": "t",- "columns": [- {- "name": "a",- "type": "int"- }- ]- },- {- "name": "t4",- "columns": [- {- "name": "a",- "type": "varchar(10)",- "default": "default value",- "comment": "this is comment, aha"- },- {- "name": "b",- "type": "char(10)"- },- {- "name": "c",- "type": "int",- "defaultExpression": "1",- "comment": "col_b"- },- {- "name": "e",- "nullable": true,- "type": "int",- "defaultExpression": "1",- "comment": "col_e"- },- {- "name": "f",- "type": "int",- "nullable": true- },- {- "name": "g",- "type": "blob",- "nullable": true- }- ],- "indexes": [- {- "name": "PRIMARY",- "expressions": [- "a",- "b",- "c"- ],- "unique": true,- "primary": true,- "visible": true- },- {- "name": "uk_a",- "expressions": [- "b"- ],- "unique": true,- "primary": false,- "visible": true- }- ],- "foreignKeys": [- {- "name": "fk1",- "columns": [- "b"- ],- "referencedTable": "t2",- "referencedColumns": [- "b"- ]- }- ]- },- {- "name": "t5",- "columns": [- {- "name": "a",- "defaultExpression": "AUTO_RANDOM(6, 54)",- "nullable": false,- "type": "bigint"- }- ],- "indexes": [- {- "name": "PRIMARY",- "expressions": [- "a"- ],- "unique": true,- "primary": true,- "visible": true- },- {- "name": "udx_a",- "expressions": [- "a"- ],- "unique": true,- "primary": false,- "visible": true- }- ]- },- {- "name": "t6",- "columns": [- {- "name": "a",- "defaultExpression": "AUTO_RANDOM(6)",- "nullable": false,- "type": "bigint"- }- ],- "indexes": [- {- "name": "PRIMARY",- "expressions": [- "a"- ],- "unique": true,- "primary": true,- "visible": true- },- {- "name": "idx_a",- "expressions": [- "a"- ],- "unique": false,- "primary": false,- "visible": true- }- ]- },- {- "name": "t2",- "columns": [- {- "name": "b",- "nullable": true,- "type": "int"- },- {- "name": "a",- "nullable": true,- "type": "int"- }- ],- "indexes": [- {- "name": "PRIMARY",- "expressions": [- "b"- ],- "unique": true,- "primary": true,- "visible": true- }- ],- "foreignKeys": [- {- "name": "fk1",- "columns": [- "b"- ],- "referencedTable": "t4",- "referencedColumns": [- "b"- ]- }- ]- }- ]- }- ]- }- result: |- --- -- Table structure for `rds`- --- CREATE TABLE `rds` (- `id` bigint NOT NULL COMMENT 'ID',- `binlog_format` enum('row','mixed','statement',''),- `x1` blob,- `c1` int AUTO_INCREMENT- ) COMMENT 'hello';-- --- -- Table structure for `users`- --- CREATE TABLE `users` (- `id` int NOT NULL COMMENT 'ID',- `age` varbinary(500),- `name` binary(10),- PRIMARY KEY (`id`)- ) COMMENT 'hello';-- --- -- Table structure for `t`- --- CREATE TABLE `t` (- `a` int NOT NULL- );-- --- -- Table structure for `t4`- --- CREATE TABLE `t4` (- `a` varchar(10) NOT NULL DEFAULT 'default value' COMMENT 'this is comment, aha',- `b` char(10) NOT NULL,- `c` int NOT NULL DEFAULT 1 COMMENT 'col_b',- `e` int DEFAULT 1 COMMENT 'col_e',- `f` int,- `g` blob,- PRIMARY KEY (`a`, `b`, `c`),- UNIQUE KEY `uk_a` (`b`),- CONSTRAINT `fk1` FOREIGN KEY (`b`) REFERENCES `t2` (`b`)- );-- --- -- Table structure for `t5`- --- CREATE TABLE `t5` (- `a` bigint NOT NULL /*T![auto_rand] AUTO_RANDOM(6, 54) */,- PRIMARY KEY (`a`),- UNIQUE KEY `udx_a` (`a`)- );-- --- -- Table structure for `t6`- --- CREATE TABLE `t6` (- `a` bigint NOT NULL /*T![auto_rand] AUTO_RANDOM(6) */,- PRIMARY KEY (`a`),- KEY `idx_a` (`a`)- );-- --- -- Table structure for `t2`- --- CREATE TABLE `t2` (- `b` int,- `a` int,- PRIMARY KEY (`b`),- CONSTRAINT `fk1` FOREIGN KEY (`b`) REFERENCES `t4` (`b`)- );-- target: |-- {- "schemas": [- {- "tables": [- {- "name": "t1",- "columns": [- {- "name": "a",- "nullable": true,- "type": "int",- "defaultExpression": "AUTO_INCREMENT"- }- ]- },- {- "name": "t2",- "columns": [- {- "name": "a",- "nullable": true,- "type": "int",- "defaultExpression": "AUTO_INCREMENT"- }- ]- },- {- "name": "t3",- "columns": [- {- "name": "a",- "nullable": true,- "type": "int",- "defaultExpression": "AUTO_INCREMENT"- }- ]- },- {- "name": "t4",- "columns": [- {- "name": "a",- "nullable": true,- "type": "int",- "defaultExpression": "1"- }- ]- }- ]- }- ]- }- result: |- --- -- Table structure for `t1`- --- CREATE TABLE `t1` (- `a` int AUTO_INCREMENT- );-- --- -- Table structure for `t2`- --- CREATE TABLE `t2` (- `a` int AUTO_INCREMENT- );-- --- -- Table structure for `t3`- --- CREATE TABLE `t3` (- `a` int AUTO_INCREMENT- );-- --- -- Table structure for `t4`- --- CREATE TABLE `t4` (- `a` int DEFAULT 1- );diff --git a/backend/tests/test-data/book_2_schema.result b/backend/tests/test-data/book_2_schema.resultdeleted file mode 100644index a52d22210d..0000000000--- a/backend/tests/test-data/book_2_schema.result+++ /dev/null@@ -1,8 +0,0 @@-CREATE TABLE book (- id INTEGER PRIMARY KEY AUTOINCREMENT,- name TEXT NULL- );-CREATE TABLE book2 (- id INTEGER PRIMARY KEY AUTOINCREMENT,- name TEXT NULL- );