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: exhaustive switch (#16175)
p0nyaf1977d7240d
diff --git a/backend/plugin/advisor/change_type.go b/backend/plugin/advisor/change_type.goindex cb80bd3bce..ffe78f4882 100644--- a/backend/plugin/advisor/change_type.go+++ b/backend/plugin/advisor/change_type.go@@ -7,12 +7,20 @@ var sqlEditorAllowlist = map[SQLReviewRuleType]bool{}func isRuleAllowed(rule SQLReviewRuleType, changeType storepb.PlanCheckRunConfig_ChangeDatabaseType) bool {- if changeType != storepb.PlanCheckRunConfig_SQL_EDITOR {+ switch changeType {+ case storepb.PlanCheckRunConfig_CHANGE_DATABASE_TYPE_UNSPECIFIED:+ return false+ case storepb.PlanCheckRunConfig_DDL:return true- }-- if _, ok := sqlEditorAllowlist[rule]; ok {+ case storepb.PlanCheckRunConfig_DDL_GHOST:+ return true+ case storepb.PlanCheckRunConfig_DML:+ return true+ case storepb.PlanCheckRunConfig_SDL:return true+ case storepb.PlanCheckRunConfig_SQL_EDITOR:+ return sqlEditorAllowlist[rule]+ default:+ return false}- return false}diff --git a/backend/plugin/advisor/mssql/test/column_maximum_varchar_length.yaml b/backend/plugin/advisor/mssql/test/column_maximum_varchar_length.yamlindex 4cd33af86d..87d0a1ec2d 100644--- a/backend/plugin/advisor/mssql/test/column_maximum_varchar_length.yaml+++ b/backend/plugin/advisor/mssql/test/column_maximum_varchar_length.yaml@@ -1,7 +1,7 @@- statement: CREATE TABLE MyTable(a VARCHAR(20));- changeType: 0+ changeType: 1- statement: ALTER TABLE MyTable ADD b VARCHAR(3000);- changeType: 0+ changeType: 1want:- status: 2code: 422@@ -12,7 +12,7 @@column: 0endposition: null- statement: ALTER TABLE MyTable ALTER COLUMN a VARCHAR(MAX);- changeType: 0+ changeType: 1want:- status: 2code: 422@@ -23,7 +23,7 @@column: 0endposition: null- statement: ALTER TABLE MyTable ALTER COLUMN a NVARCHAR(MAX);- changeType: 0+ changeType: 1want:- status: 2code: 422diff --git a/backend/plugin/advisor/mssql/test/column_no_null.yaml b/backend/plugin/advisor/mssql/test/column_no_null.yamlindex 5b78e23366..034ee9c733 100644--- a/backend/plugin/advisor/mssql/test/column_no_null.yaml+++ b/backend/plugin/advisor/mssql/test/column_no_null.yaml@@ -5,7 +5,7 @@Age INT,Address VARCHAR(200));- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -31,7 +31,7 @@Address VARCHAR(200),PRIMARY KEY (Id, Age));- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -42,7 +42,7 @@column: 0endposition: null- statement: ALTER TABLE MyTable ALTER COLUMN Name VARCHAR(100) NULL;- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -53,9 +53,9 @@column: 0endposition: null- statement: ALTER TABLE MyTable ALTER COLUMN Name VARCHAR(100) NOT NULL;- changeType: 0+ changeType: 1- statement: ALTER TABLE MyTable ADD Age INT;- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -66,7 +66,7 @@column: 0endposition: null- statement: ALTER TABLE MyTable ADD Age INT NULL;- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -77,4 +77,4 @@column: 0endposition: null- statement: ALTER TABLE MyTable ADD Age INT NOT NULL;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/mssql/test/column_required.yaml b/backend/plugin/advisor/mssql/test/column_required.yamlindex 7f4ef3626f..93236a97e0 100644--- a/backend/plugin/advisor/mssql/test/column_required.yaml+++ b/backend/plugin/advisor/mssql/test/column_required.yaml@@ -6,13 +6,13 @@updated_ts INT,updater_id INT);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t (name TEXT,age INT);- changeType: 0+ changeType: 1want:- status: 2code: 401@@ -61,7 +61,7 @@created_ts INT,updater_id INT);- changeType: 0+ changeType: 1want:- status: 2code: 401@@ -72,7 +72,7 @@column: 0endposition: null- statement: ALTER TABLE t DROP COLUMN created_ts;- changeType: 0+ changeType: 1want:- status: 2code: 401@@ -83,7 +83,7 @@column: 0endposition: null- statement: ALTER TABLE t DROP COLUMN creator_id;- changeType: 0+ changeType: 1want:- status: 2code: 401diff --git a/backend/plugin/advisor/mssql/test/column_type_disallow_list.yaml b/backend/plugin/advisor/mssql/test/column_type_disallow_list.yamlindex 824e96ade7..55870ca444 100644--- a/backend/plugin/advisor/mssql/test/column_type_disallow_list.yaml+++ b/backend/plugin/advisor/mssql/test/column_type_disallow_list.yaml@@ -4,7 +4,7 @@age INT,payload JSON);- changeType: 0+ changeType: 1want:- status: 2code: 411diff --git a/backend/plugin/advisor/mssql/test/index_not_redundant.yaml b/backend/plugin/advisor/mssql/test/index_not_redundant.yamlindex 4ac646266f..a06d5c1e83 100644--- a/backend/plugin/advisor/mssql/test/index_not_redundant.yaml+++ b/backend/plugin/advisor/mssql/test/index_not_redundant.yaml@@ -1,5 +1,5 @@- statement: CREATE INDEX test_index ON dbo.pokes (c1, c2);- changeType: 0+ changeType: 1want:- status: 2code: 817@@ -10,9 +10,9 @@column: 0endposition: null- statement: CREATE INDEX test_index ON dbo.pokes (c100, c200);- changeType: 0+ changeType: 1- statement: CREATE INDEX test_index ON [dbo].[pokes] (c1, c2);- changeType: 0+ changeType: 1want:- status: 2code: 817diff --git a/backend/plugin/advisor/mssql/test/naming_identifier_no_keyword.yaml b/backend/plugin/advisor/mssql/test/naming_identifier_no_keyword.yamlindex 604930ae94..3e035cacdd 100644--- a/backend/plugin/advisor/mssql/test/naming_identifier_no_keyword.yaml+++ b/backend/plugin/advisor/mssql/test/naming_identifier_no_keyword.yaml@@ -1,7 +1,7 @@- statement: |-CREATE TABLE [Fillfactor](Id INT, [Exec] INT);CREATE INDEX [Add] ON [Fillfactor]([Exec]);- changeType: 0+ changeType: 1want:- status: 2code: 308diff --git a/backend/plugin/advisor/mssql/test/naming_table.yaml b/backend/plugin/advisor/mssql/test/naming_table.yamlindex 065de3086d..a8f31e3ece 100644--- a/backend/plugin/advisor/mssql/test/naming_table.yaml+++ b/backend/plugin/advisor/mssql/test/naming_table.yaml@@ -1,7 +1,7 @@- statement: CREATE TABLE ALL_UPPERCASE(ID INT);- changeType: 0+ changeType: 1- statement: CREATE TABLE [\\](ID INT);- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -12,7 +12,7 @@column: 0endposition: null- statement: CREATE TABLE all_lowercase(ID INT);- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -23,11 +23,11 @@column: 0endposition: null- statement: CREATE TABLE PascalCase(ID INT);- changeType: 0+ changeType: 1- statement: execute sp_rename 'Sales.SalesTerritory', 'SALESTERR';- changeType: 0+ changeType: 1- statement: execute sp_rename 'Sales.SalesTerritory', 'salesTerr';- changeType: 0+ changeType: 1want:- status: 2code: 301diff --git a/backend/plugin/advisor/mssql/test/naming_table_no_keyword.yaml b/backend/plugin/advisor/mssql/test/naming_table_no_keyword.yamlindex 313e323052..d1666b0291 100644--- a/backend/plugin/advisor/mssql/test/naming_table_no_keyword.yaml+++ b/backend/plugin/advisor/mssql/test/naming_table_no_keyword.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE [fillfactor] (id INT);- changeType: 0+ changeType: 1want:- status: 2code: 308@@ -10,7 +10,7 @@column: 0endposition: null- statement: CREATE TABLE MyDB.MySchema.[fillfactor] (id INT);- changeType: 0+ changeType: 1want:- status: 2code: 308@@ -21,4 +21,4 @@column: 0endposition: null- statement: CREATE TABLE Person(id INT);- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/mssql/test/schema_backward_compatibility.yaml b/backend/plugin/advisor/mssql/test/schema_backward_compatibility.yamlindex e4e27a944c..eb35273418 100644--- a/backend/plugin/advisor/mssql/test/schema_backward_compatibility.yaml+++ b/backend/plugin/advisor/mssql/test/schema_backward_compatibility.yaml@@ -1,5 +1,5 @@- statement: EXEC sp_rename N'Phone', N'Telephone', N'USERDATATYPE';- changeType: 0+ changeType: 1want:- status: 2code: 102@@ -10,7 +10,7 @@column: 0endposition: null- statement: DROP TABLE MyTable;- changeType: 0+ changeType: 1want:- status: 2code: 112@@ -23,9 +23,9 @@- statement: |-CREATE TABLE MyTable(Id INT PRIMARY KEY);DROP TABLE MyTable;- changeType: 0+ changeType: 1- statement: DROP SCHEMA MySchema;- changeType: 0+ changeType: 1want:- status: 2code: 112@@ -38,9 +38,9 @@- statement: |-CREATE SCHEMA AUTHORIZATION dbo;DROP SCHEMA dbo;- changeType: 0+ changeType: 1- statement: DROP DATABASE MyDB;- changeType: 0+ changeType: 1want:- status: 2code: 112@@ -53,7 +53,7 @@- statement: |-CREATE DATABASE MyDB;DROP DATABASE MyDB;- changeType: 0+ changeType: 1- statement: |-ALTER TABLE MyTable DROP COLUMN MyColumnOne, MyColumnTwo;ALTER TABLE MyTable ALTER COLUMN MyColumnOne INT NOT NULL;@@ -64,7 +64,7 @@ALTER TABLE MyTable WITH CHECK ADD CONSTRAINT MyConstraint CHECK (MyColumnOne > 0);ALTER TABLE MyTable WITH NOCHECK ADD FOREIGN KEY (MyColumnOne) REFERENCES MyTableTwo(MyColumnTwo);ALTER TABLE MyTable WITH CHECK ADD FOREIGN KEY (MyColumnOne) REFERENCES MyTableTwo(MyColumnTwo);- changeType: 0+ changeType: 1want:- status: 2code: 112@@ -123,7 +123,7 @@column: 0endposition: null- statement: EXEC sp_rename 'Sales.SalesTerritory', 'SalesTerr';- changeType: 0+ changeType: 1want:- status: 2code: 102@@ -134,7 +134,7 @@column: 0endposition: null- statement: EXEC sp_rename 'dbo.ErrorLog.ErrorTime', 'ErrorDateTime', 'COLUMN';- changeType: 0+ changeType: 1want:- status: 2code: 102diff --git a/backend/plugin/advisor/mssql/test/statement_disallow_cross_db_queries.yaml b/backend/plugin/advisor/mssql/test/statement_disallow_cross_db_queries.yamlindex 82a6175d44..2cb2eb330d 100644--- a/backend/plugin/advisor/mssql/test/statement_disallow_cross_db_queries.yaml+++ b/backend/plugin/advisor/mssql/test/statement_disallow_cross_db_queries.yaml@@ -1,10 +1,10 @@- statement: SELECT * FROM MASTER.dbo.pokes;- changeType: 0+ changeType: 1- statement: |-WITH foo1 AS (SELECT * FROM master2.dbo.tech_book)SELECT * FROM master.dbo.pokes;CREATE TABLE pokes (foo int);- changeType: 0+ changeType: 1want:- status: 2code: 233@@ -17,7 +17,7 @@- statement: |-USE master2;SELECT * FROM master.dbo.pokes;- changeType: 0+ changeType: 1want:- status: 2code: 233diff --git a/backend/plugin/advisor/mssql/test/statement_select_no_select_all.yaml b/backend/plugin/advisor/mssql/test/statement_select_no_select_all.yamlindex 2ff05e6e09..82b924dd68 100644--- a/backend/plugin/advisor/mssql/test/statement_select_no_select_all.yaml+++ b/backend/plugin/advisor/mssql/test/statement_select_no_select_all.yaml@@ -1,5 +1,5 @@- statement: SELECT * FROM t- changeType: 0+ changeType: 1want:- status: 2code: 203@@ -10,9 +10,9 @@column: 0endposition: null- statement: SELECT a, b FROM t- changeType: 0+ changeType: 1- statement: SELECT a, b FROM (SELECT * from t1, t2) t- changeType: 0+ changeType: 1want:- status: 2code: 203@@ -23,7 +23,7 @@column: 0endposition: null- statement: INSERT INTO t SELECT * FROM t1- changeType: 0+ changeType: 1want:- status: 2code: 203diff --git a/backend/plugin/advisor/mssql/test/statement_where_disallow_functions_and_calculations.yaml b/backend/plugin/advisor/mssql/test/statement_where_disallow_functions_and_calculations.yamlindex bcd55d9dfe..b6a03b771c 100644--- a/backend/plugin/advisor/mssql/test/statement_where_disallow_functions_and_calculations.yaml+++ b/backend/plugin/advisor/mssql/test/statement_where_disallow_functions_and_calculations.yaml@@ -3,7 +3,7 @@SELECT foo FROM pokes WHERE (foo + 1) * 2 > 0;INSERT INTO pokes VALUES(1);SELECT foo FROM pokes WHERE ~foo > 0;- changeType: 0+ changeType: 1want:- status: 2code: 234@@ -24,7 +24,7 @@- statement: |-SELECT foo FROM pokes WHERE foo | -foo > 0;SELECT bar FROM pokes WHERE bar > AVG(bar);- changeType: 0+ changeType: 1want:- status: 2code: 234@@ -43,15 +43,15 @@column: 0endposition: null- statement: SELECT bar FROM pokes WHERE bar > 1;- changeType: 0+ changeType: 1- statement: |-SELECT Department, AVG(Salary) AS AvgSalaryFROM EmployeesGROUP BY DepartmentHAVING AVG(Salary) * 3 + 1 > 50000;- changeType: 0+ changeType: 1- statement: select * from (select * from t where t.a > 1) t1 where a > AVG(a);- changeType: 0+ changeType: 1want:- status: 2code: 234diff --git a/backend/plugin/advisor/mssql/test/statement_where_require_select.yaml b/backend/plugin/advisor/mssql/test/statement_where_require_select.yamlindex c93a8a07d1..6544aad733 100644--- a/backend/plugin/advisor/mssql/test/statement_where_require_select.yaml+++ b/backend/plugin/advisor/mssql/test/statement_where_require_select.yaml@@ -1,5 +1,5 @@- statement: SELECT * FROM MyTable;- changeType: 0+ changeType: 1want:- status: 2code: 202@@ -10,12 +10,12 @@column: 0endposition: null- statement: SELECT * FROM MyTable WHERE a = 1;- changeType: 0+ changeType: 1- statement: |-WITH CteA AS (SELECT * FROM TableA WHERE a = 1),CteB AS (SELECT * FROM TableB)SELECT * FROM CteA INNER JOIN CteB ON CteA.a = CteB.b;- changeType: 0+ changeType: 1want:- status: 2code: 202@@ -34,4 +34,4 @@column: 0endposition: null- statement: SELECT 1;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/mssql/test/statement_where_require_update_delete.yaml b/backend/plugin/advisor/mssql/test/statement_where_require_update_delete.yamlindex 10867be611..16493a590d 100644--- a/backend/plugin/advisor/mssql/test/statement_where_require_update_delete.yaml+++ b/backend/plugin/advisor/mssql/test/statement_where_require_update_delete.yaml@@ -1,5 +1,5 @@- statement: UPDATE MyTable SET a = 1;- changeType: 0+ changeType: 1want:- status: 2code: 202@@ -10,9 +10,9 @@column: 0endposition: null- statement: UPDATE MyTable SET a = 1 WHERE a = 1;- changeType: 0+ changeType: 1- statement: DELETE FROM MyTable;- changeType: 0+ changeType: 1want:- status: 2code: 202@@ -23,4 +23,4 @@column: 0endposition: null- statement: DELETE FROM MyTable WHERE a = 1;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/mssql/test/system_function_disallow_create.yaml b/backend/plugin/advisor/mssql/test/system_function_disallow_create.yamlindex cbf03b707c..f66a779881 100644--- a/backend/plugin/advisor/mssql/test/system_function_disallow_create.yaml+++ b/backend/plugin/advisor/mssql/test/system_function_disallow_create.yaml@@ -13,7 +13,7 @@SET @ret = 0;RETURN @ret;END;- changeType: 0+ changeType: 1want:- status: 2code: 1701diff --git a/backend/plugin/advisor/mssql/test/system_procedure_disallow_create.yaml b/backend/plugin/advisor/mssql/test/system_procedure_disallow_create.yamlindex 5973cdf8fb..2cda3c4467 100644--- a/backend/plugin/advisor/mssql/test/system_procedure_disallow_create.yaml+++ b/backend/plugin/advisor/mssql/test/system_procedure_disallow_create.yaml@@ -17,7 +17,7 @@WHERE FirstName = @FirstName AND LastName = @LastName;ENDGO- changeType: 0+ changeType: 1want:- status: 2code: 1401diff --git a/backend/plugin/advisor/mssql/test/table_disallow_ddl.yaml b/backend/plugin/advisor/mssql/test/table_disallow_ddl.yamlindex 09e59ae4ff..87f702514a 100644--- a/backend/plugin/advisor/mssql/test/table_disallow_ddl.yaml+++ b/backend/plugin/advisor/mssql/test/table_disallow_ddl.yaml@@ -7,7 +7,7 @@Id INT NOT NULL,Name VARCHAR(50) NOT NULL);- changeType: 0+ changeType: 1want:- status: 2code: 613diff --git a/backend/plugin/advisor/mssql/test/table_disallow_dml.yaml b/backend/plugin/advisor/mssql/test/table_disallow_dml.yamlindex 55665fa7ee..0ebe5302cf 100644--- a/backend/plugin/advisor/mssql/test/table_disallow_dml.yaml+++ b/backend/plugin/advisor/mssql/test/table_disallow_dml.yaml@@ -2,7 +2,7 @@MERGE INTO MySchema.Identifier USING MySchema.MyTable ON Identifier.Id = MyTable.IdWHEN MATCHED THEN UPDATE SET Identifier.Name = MyTable.NameWHEN NOT MATCHED THEN INSERT (Id, Name) VALUES (MyTable.Id, MyTable.Name);- changeType: 0+ changeType: 1want:- status: 2code: 614@@ -15,7 +15,7 @@- statement: |-INSERT INTO MySchema.MyTable (Id, Name) VALUES (1, 'Alice');INSERT INTO MySchema.Identifier (Id, Name) VALUES (1, 'Alice');- changeType: 0+ changeType: 1want:- status: 2code: 614@@ -26,7 +26,7 @@column: 0endposition: null- statement: DELETE FROM MySchema.Identifier WHERE Id = 1;- changeType: 0+ changeType: 1want:- status: 2code: 614@@ -37,7 +37,7 @@column: 0endposition: null- statement: UPDATE MySchema.Identifier SET Name = 'Bob' WHERE Id = 1;- changeType: 0+ changeType: 1want:- status: 2code: 614@@ -48,7 +48,7 @@column: 0endposition: null- statement: SELECT * INTO MySchema.Identifier FROM MySchema.MyTable;- changeType: 0+ changeType: 1want:- status: 2code: 614diff --git a/backend/plugin/advisor/mssql/test/table_drop_naming_convention.yaml b/backend/plugin/advisor/mssql/test/table_drop_naming_convention.yamlindex e9643091cf..59d3e35a52 100644--- a/backend/plugin/advisor/mssql/test/table_drop_naming_convention.yaml+++ b/backend/plugin/advisor/mssql/test/table_drop_naming_convention.yaml@@ -1,7 +1,7 @@- statement: DROP TABLE IF EXISTS [Foo_delete];- changeType: 0+ changeType: 1- statement: DROP TABLE Foo;- changeType: 0+ changeType: 1want:- status: 2code: 603@@ -12,7 +12,7 @@column: 0endposition: null- statement: DROP TABLE [Foo], [Bar_delete];- changeType: 0+ changeType: 1want:- status: 2code: 603diff --git a/backend/plugin/advisor/mssql/test/table_no_foreign_key.yaml b/backend/plugin/advisor/mssql/test/table_no_foreign_key.yamlindex f625f62ccb..1da6a9db95 100644--- a/backend/plugin/advisor/mssql/test/table_no_foreign_key.yaml+++ b/backend/plugin/advisor/mssql/test/table_no_foreign_key.yaml@@ -5,7 +5,7 @@FullName VARCHAR(10),POSITION VARCHAR(100));- changeType: 0+ changeType: 1want:- status: 2code: 602@@ -23,7 +23,7 @@Position VARCHAR(100),FOREIGN KEY (Id) REFERENCES PERSON(Id));- changeType: 0+ changeType: 1want:- status: 2code: 602@@ -41,7 +41,7 @@Position VARCHAR(100));ALTER TABLE Customer ADD FOREIGN KEY (Id) REFERENCES Person(Id);- changeType: 0+ changeType: 1want:- status: 2code: 602@@ -64,4 +64,4 @@FullName VARCHAR(10),Position VARCHAR(100));- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/mssql/test/table_require_pk.yaml b/backend/plugin/advisor/mssql/test/table_require_pk.yamlindex 29618d6792..016589d526 100644--- a/backend/plugin/advisor/mssql/test/table_require_pk.yaml+++ b/backend/plugin/advisor/mssql/test/table_require_pk.yaml@@ -3,7 +3,7 @@Id INT NOT NULL,Name VARCHAR(50) NOT NULL);- changeType: 0+ changeType: 1want:- status: 2code: 601@@ -18,13 +18,13 @@Id INT NOT NULL PRIMARY KEY,Name VARCHAR(50) NOT NULL);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE MySchema.MyTable (Id INT NOT NULL,Name VARCHAR(50) NOT NULL,PRIMARY KEY (Id));- changeType: 0+ changeType: 1- statement: ALTER TABLE MySchema.MyTable ADD CONSTRAINT PK_MyTable PRIMARY KEY (Id);- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/mysql/test/column_auto_increment_initial_value.yaml b/backend/plugin/advisor/mysql/test/column_auto_increment_initial_value.yamlindex 301f2a2c12..4bd33083ff 100644--- a/backend/plugin/advisor/mysql/test/column_auto_increment_initial_value.yaml+++ b/backend/plugin/advisor/mysql/test/column_auto_increment_initial_value.yaml@@ -1,11 +1,11 @@- statement: CREATE TABLE t(a int);- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a int auto_increment) auto_increment = 20;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t1(a int auto_increment) auto_increment = 20;CREATE TABLE t2(a int auto_increment) auto_increment = 2;- changeType: 0+ changeType: 1want:- status: 2code: 416@@ -20,7 +20,7 @@ALTER TABLE t COMMENT 'table t';ALTER TABLE t AUTO_INCREMENT = 20;ALTER TABLE t AUTO_INCREMENT = 100;- changeType: 0+ changeType: 1want:- status: 2code: 416diff --git a/backend/plugin/advisor/mysql/test/column_auto_increment_must_integer.yaml b/backend/plugin/advisor/mysql/test/column_auto_increment_must_integer.yamlindex f90cb29572..240b57854f 100644--- a/backend/plugin/advisor/mysql/test/column_auto_increment_must_integer.yaml+++ b/backend/plugin/advisor/mysql/test/column_auto_increment_must_integer.yaml@@ -9,11 +9,11 @@CREATE TABLE t8(a MEDIUMINT AUTO_INCREMENT);CREATE TABLE t9(a bigint AUTO_INCREMENT);CREATE TABLE t10(a BIGINT AUTO_INCREMENT);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t1(a INT AUTO_INCREMENT);CREATE TABLE t2(a varchar(255) AUTO_INCREMENT);- changeType: 0+ changeType: 1want:- status: 2code: 410@@ -26,7 +26,7 @@- statement: |-CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN a varchar(255) AUTO_INCREMENT;- changeType: 0+ changeType: 1want:- status: 2code: 410@@ -39,7 +39,7 @@- statement: |-CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN a varchar(255) AUTO_INCREMENT, ADD COLUMN c INT;- changeType: 0+ changeType: 1want:- status: 2code: 410@@ -52,7 +52,7 @@- statement: |-CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN (a varchar(255) AUTO_INCREMENT, c INT);- changeType: 0+ changeType: 1want:- status: 2code: 410@@ -66,7 +66,7 @@CREATE TABLE t(a int, b int);ALTER TABLE t MODIFY COLUMN a varchar(255) AUTO_INCREMENT;ALTER TABLE t MODIFY COLUMN b varchar(255);- changeType: 0+ changeType: 1want:- status: 2code: 410@@ -79,7 +79,7 @@- statement: |-CREATE TABLE t(b int);ALTER TABLE t CHANGE COLUMN b a varchar(255) AUTO_INCREMENT;- changeType: 0+ changeType: 1want:- status: 2code: 410diff --git a/backend/plugin/advisor/mysql/test/column_auto_increment_must_unsigned.yaml b/backend/plugin/advisor/mysql/test/column_auto_increment_must_unsigned.yamlindex 19ce2f7356..023ad9f298 100644--- a/backend/plugin/advisor/mysql/test/column_auto_increment_must_unsigned.yaml+++ b/backend/plugin/advisor/mysql/test/column_auto_increment_must_unsigned.yaml@@ -1,7 +1,7 @@- statement: CREATE TABLE t(a INT UNSIGNED AUTO_INCREMENT);- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a INT AUTO_INCREMENT);- changeType: 0+ changeType: 1want:- status: 2code: 417@@ -12,7 +12,7 @@column: 0endposition: null- statement: CREATE TABLE t(a INT SIGNED AUTO_INCREMENT);- changeType: 0+ changeType: 1want:- status: 2code: 417@@ -23,11 +23,11 @@column: 0endposition: null- statement: CREATE TABLE t(a INT ZEROFILL AUTO_INCREMENT);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN a INT AUTO_INCREMENT, ADD COLUMN c INT ZEROFILL AUTO_INCREMENT, ADD COLUMN d INT UNSIGNED AUTO_INCREMENT;- changeType: 0+ changeType: 1want:- status: 2code: 417@@ -41,7 +41,7 @@CREATE TABLE t(a int, b int);ALTER TABLE t MODIFY COLUMN a INT AUTO_INCREMENT;ALTER TABLE t MODIFY COLUMN a INT UNSIGNED AUTO_INCREMENT;- changeType: 0+ changeType: 1want:- status: 2code: 417@@ -55,7 +55,7 @@CREATE TABLE t(b int);ALTER TABLE t CHANGE COLUMN b a INT AUTO_INCREMENT;ALTER TABLE t CHANGE COLUMN a c INT UNSIGNED AUTO_INCREMENT;- changeType: 0+ changeType: 1want:- status: 2code: 417diff --git a/backend/plugin/advisor/mysql/test/column_comment.yaml b/backend/plugin/advisor/mysql/test/column_comment.yamlindex e2f315fa79..e9a5b51a8a 100644--- a/backend/plugin/advisor/mysql/test/column_comment.yaml+++ b/backend/plugin/advisor/mysql/test/column_comment.yaml@@ -11,7 +11,7 @@UNIQUE KEY uk1(id, name),FOREIGN KEY fk1(roomId) REFERENCES room(id),INDEX idx_userTable_content(content)) ENGINE = CSV COLLATE latin1_bin;- changeType: 0+ changeType: 1want:- status: 2code: 1032@@ -49,16 +49,16 @@INDEX idx_user_name(name),UNIQUE KEY uk_user_id_name(id, name)) ENGINE = INNODB COMMENT 'comment';- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a int COMMENT 'comments');- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int COMMENT 'some comments',b int,c int);- changeType: 0+ changeType: 1want:- status: 2code: 1301@@ -87,7 +87,7 @@- statement: |-CREATE TABLE t(a int COMMENT 'comment');ALTER TABLE t ADD COLUMN b int;- changeType: 0+ changeType: 1want:- status: 2code: 1032@@ -100,7 +100,7 @@- statement: |-CREATE TABLE t(a int COMMENT 'comment');ALTER TABLE t ADD COLUMN (b int, c int);- changeType: 0+ changeType: 1want:- status: 2code: 1032@@ -121,7 +121,7 @@- statement: |-CREATE TABLE t(a int COMMENT 'this is comment');ALTER TABLE t CHANGE COLUMN a b int;- changeType: 0+ changeType: 1want:- status: 2code: 1301@@ -142,7 +142,7 @@- statement: |-CREATE TABLE t(b int COMMENT 'It is comment');ALTER TABLE t MODIFY COLUMN b int;- changeType: 0+ changeType: 1want:- status: 2code: 1301@@ -163,7 +163,7 @@- statement: |-CREATE TABLE t(b int COMMENT 'It is COMMENT');ALTER TABLE t MODIFY COLUMN b int COMMENT 'abcdefghiakljhakljdsfalugelkhnabsdguelkadf';- changeType: 0+ changeType: 1want:- status: 2code: 1301diff --git a/backend/plugin/advisor/mysql/test/column_current_time_count_limit.yaml b/backend/plugin/advisor/mysql/test/column_current_time_count_limit.yamlindex c99ca69ad5..035513c86c 100644--- a/backend/plugin/advisor/mysql/test/column_current_time_count_limit.yaml+++ b/backend/plugin/advisor/mysql/test/column_current_time_count_limit.yaml@@ -11,7 +11,7 @@UNIQUE KEY uk1(id, name),FOREIGN KEY fk1(roomId) REFERENCES room(id),INDEX idx_userTable_content(content)) ENGINE = CSV COLLATE latin1_bin;- changeType: 0+ changeType: 1want:- status: 2code: 419@@ -33,16 +33,16 @@INDEX idx_user_name(name),UNIQUE KEY uk_user_id_name(id, name)) ENGINE = INNODB COMMENT 'comment';- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a timestamp, b timestamp)- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a timestamp default now(),b timestamp default current_timestamp(),c timestamp default localtime);- changeType: 0+ changeType: 1want:- status: 2code: 418@@ -57,7 +57,7 @@a timestamp default now() on update localtime,b timestamp default current_timestamp() on update localtimestamp());- changeType: 0+ changeType: 1want:- status: 2code: 419@@ -70,7 +70,7 @@- statement: |-ALTER TABLE tech_book ADD COLUMN a timestamp default now() on update localtime;ALTER TABLE tech_book ADD COLUMN b timestamp default current_timestamp() on update localtimestamp();- changeType: 0+ changeType: 1want:- status: 2code: 419diff --git a/backend/plugin/advisor/mysql/test/column_disallow_change.yaml b/backend/plugin/advisor/mysql/test/column_disallow_change.yamlindex f09c34d59f..e76a394a8c 100644--- a/backend/plugin/advisor/mysql/test/column_disallow_change.yaml+++ b/backend/plugin/advisor/mysql/test/column_disallow_change.yaml@@ -1,11 +1,11 @@- statement: |-CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN a int;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(b int);ALTER TABLE t CHANGE COLUMN b a int;- changeType: 0+ changeType: 1want:- status: 2code: 406diff --git a/backend/plugin/advisor/mysql/test/column_disallow_change_type.yaml b/backend/plugin/advisor/mysql/test/column_disallow_change_type.yamlindex e292659455..cd9fd66748 100644--- a/backend/plugin/advisor/mysql/test/column_disallow_change_type.yaml+++ b/backend/plugin/advisor/mysql/test/column_disallow_change_type.yaml@@ -3,7 +3,7 @@ALTER TABLE tech_book MODIFY id INT;ALTER TABLE tech_book MODIFY id INTEGER;ALTER TABLE tech_book MODIFY id INTEGER UNSIGNED;- changeType: 0+ changeType: 1want:- status: 2code: 403@@ -24,7 +24,7 @@- statement: |-ALTER TABLE tech_book MODIFY id int;ALTER TABLE tech_book MODIFY id int(4);- changeType: 0+ changeType: 1want:- status: 2code: 403@@ -37,7 +37,7 @@- statement: |-ALTER TABLE tech_book MODIFY id bigint;ALTER TABLE tech_book MODIFY id smallint;- changeType: 0+ changeType: 1want:- status: 2code: 403@@ -56,7 +56,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book CHANGE name uname varchar(20);- changeType: 0+ changeType: 1want:- status: 2code: 403diff --git a/backend/plugin/advisor/mysql/test/column_disallow_changing_order.yaml b/backend/plugin/advisor/mysql/test/column_disallow_changing_order.yamlindex 52f8b7f38f..ffdecc45fe 100644--- a/backend/plugin/advisor/mysql/test/column_disallow_changing_order.yaml+++ b/backend/plugin/advisor/mysql/test/column_disallow_changing_order.yaml@@ -1,11 +1,11 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t MODIFY COLUMN a int;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int);ALTER TABLE t MODIFY COLUMN a int FIRST;- changeType: 0+ changeType: 1want:- status: 2code: 407@@ -18,7 +18,7 @@- statement: |-CREATE TABLE t(b int, a1 int);ALTER TABLE t CHANGE COLUMN a1 a int FIRST;- changeType: 0+ changeType: 1want:- status: 2code: 407@@ -31,7 +31,7 @@- statement: |-CREATE TABLE t(a int, b int);ALTER TABLE t MODIFY COLUMN a int AFTER b;- changeType: 0+ changeType: 1want:- status: 2code: 407@@ -44,7 +44,7 @@- statement: |-CREATE TABLE t(a1 int, b int);ALTER TABLE t CHANGE COLUMN a1 a int AFTER b;- changeType: 0+ changeType: 1want:- status: 2code: 407diff --git a/backend/plugin/advisor/mysql/test/column_disallow_drop_in_index.yaml b/backend/plugin/advisor/mysql/test/column_disallow_drop_in_index.yamlindex 3423953509..aa8b366030 100644--- a/backend/plugin/advisor/mysql/test/column_disallow_drop_in_index.yaml+++ b/backend/plugin/advisor/mysql/test/column_disallow_drop_in_index.yaml@@ -11,7 +11,7 @@UNIQUE KEY uk1(id, name),FOREIGN KEY fk1(roomId) REFERENCES room(id),INDEX idx_userTable_content(content)) ENGINE = CSV COLLATE latin1_bin;- changeType: 0+ changeType: 1- statement: |CREATE TABLE user(id INT PRIMARY KEY COMMENT 'comment',@@ -24,15 +24,15 @@INDEX idx_user_name(name),UNIQUE KEY uk_user_id_name(id, name)) ENGINE = INNODB COMMENT 'comment';- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int, b int, INDEX idx_a(a));ALTER TABLE t DROP COLUMN b;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int, b int, INDEX idx_b(b));ALTER TABLE t DROP COLUMN b;- changeType: 0+ changeType: 1want:- status: 2code: 424@@ -45,7 +45,7 @@- statement: |-CREATE TABLE t(a int, c int, INDEX idx_ac(a,c));ALTER TABLE t DROP COLUMN c;- changeType: 0+ changeType: 1want:- status: 2code: 424@@ -59,12 +59,12 @@CREATE TABLE t(a int, b int, INDEX idx_a(a));CREATE TABLE y(a int, b int);ALTER TABLE y DROP COLUMN a;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int,b int, c int, INDEX idx_ac(a,c));ALTER TABLE t DROP COLUMN a;ALTER TABLE t DROP COLUMN c;- changeType: 0+ changeType: 1want:- status: 2code: 424diff --git a/backend/plugin/advisor/mysql/test/column_disallow_set_charset.yaml b/backend/plugin/advisor/mysql/test/column_disallow_set_charset.yamlindex bdcdc9a7f3..6036724495 100644--- a/backend/plugin/advisor/mysql/test/column_disallow_set_charset.yaml+++ b/backend/plugin/advisor/mysql/test/column_disallow_set_charset.yaml@@ -1,13 +1,13 @@- statement: |-CREATE TABLE dt_relation_temp(objto int);ALTER TABLE dt_relation_temp ADD COLUMN infos json null comment'关系信息点'AFTER`objto`;- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a varchar(20));- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t1(a varchar(20) CHARSET ascii);CREATE TABLE t2(a varchar(20) CHARSET ascii);- changeType: 0+ changeType: 1want:- status: 2code: 414@@ -28,7 +28,7 @@- statement: |-ALTER TABLE tech_book ADD COLUMN a varchar(20);ALTER TABLE tech_book ADD COLUMN b varchar(20) CHARSET ascii;- changeType: 0+ changeType: 1want:- status: 2code: 414@@ -42,7 +42,7 @@ALTER TABLE tech_book ADD COLUMN a varchar(20), ADD COLUMN b varchar(20);ALTER TABLE tech_book ADD COLUMN (c varchar(20) CHARSET ascii, d varchar(20) CHARSET ascii);ALTER TABLE tech_book ADD COLUMN e varchar(20) CHARSET ascii;- changeType: 0+ changeType: 1want:- status: 2code: 414@@ -71,7 +71,7 @@- statement: |-ALTER TABLE tech_book MODIFY COLUMN id int;ALTER TABLE tech_book MODIFY COLUMN id varchar(20) CHARSET ascii;- changeType: 0+ changeType: 1want:- status: 2code: 414@@ -84,7 +84,7 @@- statement: |-ALTER TABLE tech_book CHANGE COLUMN name name int;ALTER TABLE tech_book CHANGE COLUMN name name varchar(20) CHARSET ascii;- changeType: 0+ changeType: 1want:- status: 2code: 414diff --git a/backend/plugin/advisor/mysql/test/column_maximum_character_length.yaml b/backend/plugin/advisor/mysql/test/column_maximum_character_length.yamlindex 284540a68c..2152a60f35 100644--- a/backend/plugin/advisor/mysql/test/column_maximum_character_length.yaml+++ b/backend/plugin/advisor/mysql/test/column_maximum_character_length.yaml@@ -1,13 +1,13 @@- statement: CREATE TABLE t1(name char);- changeType: 0+ changeType: 1- statement: CREATE TABLE t(name char(20));- changeType: 0+ changeType: 1- statement: CREATE TABLE t(name varchar(225));- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t1(name char(20));CREATE TABLE t2(name char(225));- changeType: 0+ changeType: 1want:- status: 2code: 415@@ -20,7 +20,7 @@- statement: |-ALTER TABLE tech_book ADD COLUMN name_1 char(20);ALTER TABLE tech_book ADD COLUMN name_2 char(225);- changeType: 0+ changeType: 1want:- status: 2code: 415@@ -33,7 +33,7 @@- statement: |-ALTER TABLE tech_book CHANGE COLUMN name name char(20);ALTER TABLE tech_book CHANGE COLUMN name name char(225);- changeType: 0+ changeType: 1want:- status: 2code: 415@@ -46,7 +46,7 @@- statement: |-ALTER TABLE tech_book MODIFY COLUMN name char(20);ALTER TABLE tech_book MODIFY COLUMN name char(225);- changeType: 0+ changeType: 1want:- status: 2code: 415diff --git a/backend/plugin/advisor/mysql/test/column_maximum_varchar_length.yaml b/backend/plugin/advisor/mysql/test/column_maximum_varchar_length.yamlindex d2fd67498f..0853448e5a 100644--- a/backend/plugin/advisor/mysql/test/column_maximum_varchar_length.yaml+++ b/backend/plugin/advisor/mysql/test/column_maximum_varchar_length.yaml@@ -1,7 +1,7 @@- statement: CREATE TABLE t(name varchar(225));- changeType: 0+ changeType: 1- statement: CREATE TABLE t1(name varchar(3000));- changeType: 0+ changeType: 1want:- status: 2code: 422@@ -14,7 +14,7 @@- statement: |-ALTER TABLE tech_book ADD COLUMN name_1 char(20);ALTER TABLE tech_book ADD COLUMN name_2 varchar(3000);- changeType: 0+ changeType: 1want:- status: 2code: 422diff --git a/backend/plugin/advisor/mysql/test/column_no_null.yaml b/backend/plugin/advisor/mysql/test/column_no_null.yamlindex 0d45cbe07c..e1b78fcea1 100644--- a/backend/plugin/advisor/mysql/test/column_no_null.yaml+++ b/backend/plugin/advisor/mysql/test/column_no_null.yaml@@ -3,7 +3,7 @@id int,name varchar(255));- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -22,7 +22,7 @@column: 0endposition: null- statement: CREATE TABLE book(id int PRIMARY KEY, name varchar(255));- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -33,7 +33,7 @@column: 0endposition: null- statement: CREATE TABLE book(id int NOT NULL, name varchar(255));- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -44,11 +44,11 @@column: 0endposition: null- statement: CREATE TABLE book(id int PRIMARY KEY, name varchar(255) NOT NULL);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(a int NOT NULL);ALTER TABLE book ADD COLUMN (id int, name varchar(255) NOT NULL);- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -61,7 +61,7 @@- statement: |-CREATE TABLE book(a int NOT NULL);ALTER TABLE book ADD COLUMN id int, ADD COLUMN name varchar(255) NOT NULL;- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -74,15 +74,15 @@- statement: |-CREATE TABLE book(a int NOT NULL);ALTER TABLE book ADD COLUMN (id int PRIMARY KEY, name varchar(255) NOT NULL);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(a int NOT NULL);ALTER TABLE book ADD COLUMN id int PRIMARY KEY, ADD COLUMN name varchar(255) NOT NULL;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(id int NOT NULL);ALTER TABLE book CHANGE COLUMN id name varchar(255);- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -95,4 +95,4 @@- statement: |-CREATE TABLE book(id int NOT NULL);ALTER TABLE book CHANGE COLUMN id name varchar(255) NOT NULL;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/mysql/test/column_require_default.yaml b/backend/plugin/advisor/mysql/test/column_require_default.yamlindex 741841faca..428bdb6341 100644--- a/backend/plugin/advisor/mysql/test/column_require_default.yaml+++ b/backend/plugin/advisor/mysql/test/column_require_default.yaml@@ -4,7 +4,7 @@b varchar(50) not null unique,primary key (a));- changeType: 0+ changeType: 1want:- status: 2code: 420@@ -23,7 +23,7 @@e json,f geometry);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a geometry,@@ -35,7 +35,7 @@g multipolygon,h geometrycollection);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t1(a int primary key@@ -43,13 +43,13 @@CREATE TABLE t2(a int auto_increment primary key);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int,b int default 1)- changeType: 0+ changeType: 1want:- status: 2code: 420@@ -63,7 +63,7 @@ALTER TABLE tech_book ADD COLUMN a BLOB;ALTER TABLE tech_book ADD COLUMN b timestamp;ALTER TABLE tech_book MODIFY COLUMN a varchar(220);- changeType: 0+ changeType: 1want:- status: 2code: 420@@ -82,7 +82,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book ADD COLUMN (a BLOB, b timestamp);- changeType: 0+ changeType: 1want:- status: 2code: 420@@ -96,7 +96,7 @@ALTER TABLE tech_book ADD COLUMN a VARCHAR(255) DEFAULT 'default value';ALTER TABLE tech_book MODIFY COLUMN a char(25) DEFAULT 'default';ALTER TABLE tech_book CHANGE COLUMN a b int;- changeType: 0+ changeType: 1want:- status: 2code: 420@@ -111,4 +111,4 @@id int,PRIMARY KEY (id))- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/mysql/test/column_required.yaml b/backend/plugin/advisor/mysql/test/column_required.yamlindex b2975f3e8e..1d1f0ef1cb 100644--- a/backend/plugin/advisor/mysql/test/column_required.yaml+++ b/backend/plugin/advisor/mysql/test/column_required.yaml@@ -5,7 +5,7 @@CREATE TABLE t3(id INT, creator_id INT, created_ts timestamp);CREATE TABLE t4(id INT, creator_id INT, created_ts timestamp, updater_id INT);CREATE TABLE t5(id INT, creator_id INT, created_ts timestamp, updater_id INT, updated_ts timestamp);- changeType: 0+ changeType: 1want:- status: 2code: 401@@ -55,7 +55,7 @@updater_id int,updated_ts timestamp);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(id int,@@ -65,7 +65,7 @@updated_ts timestamp);ALTER TABLE book RENAME COLUMN creator_id TO creator;- changeType: 0+ changeType: 1want:- status: 2code: 401@@ -84,7 +84,7 @@updated_ts timestamp);ALTER TABLE book RENAME COLUMN creator TO creator_id;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(id int,@@ -94,7 +94,7 @@updated_ts timestamp);ALTER TABLE book CHANGE COLUMN creator_id creator int;- changeType: 0+ changeType: 1want:- status: 2code: 401@@ -113,7 +113,7 @@updated_ts timestamp);ALTER TABLE book CHANGE COLUMN creator creator_id int;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(id int,@@ -123,7 +123,7 @@updated_ts timestamp);ALTER TABLE book DROP COLUMN creator_id;- changeType: 0+ changeType: 1want:- status: 2code: 401@@ -143,7 +143,7 @@content varchar(255));ALTER TABLE book DROP COLUMN content;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(id int,@@ -152,7 +152,7 @@updated_ts timestamp);ALTER TABLE book ADD COLUMN content varchar(255);- changeType: 0+ changeType: 1want:- status: 2code: 401@@ -171,7 +171,7 @@updated_ts timestamp);ALTER TABLE book ADD COLUMN creator_id int;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(id int,@@ -184,7 +184,7 @@created_ts timestamp,updated_ts timestamp);- changeType: 0+ changeType: 1want:- status: 2code: 401@@ -211,7 +211,7 @@updated_ts timestamp);DROP TABLE book;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(id int@@ -222,4 +222,4 @@updater_id int,updated_ts timestamp);- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/mysql/test/column_set_default_for_not_null.yaml b/backend/plugin/advisor/mysql/test/column_set_default_for_not_null.yamlindex ade35aa0f7..ad9506f053 100644--- a/backend/plugin/advisor/mysql/test/column_set_default_for_not_null.yaml+++ b/backend/plugin/advisor/mysql/test/column_set_default_for_not_null.yaml@@ -2,17 +2,17 @@CREATE TABLE book(id int PRIMARY KEY DEFAULT 0);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(id int PRIMARY KEY);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(id int NOT NULL);- changeType: 0+ changeType: 1want:- status: 2code: 404@@ -27,15 +27,15 @@id int,PRIMARY KEY (id));- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(a int);ALTER TABLE book ADD COLUMN id int PRIMARY KEY;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(a int);ALTER TABLE book ADD COLUMN id int NOT NULL;- changeType: 0+ changeType: 1want:- status: 2code: 404@@ -48,7 +48,7 @@- statement: |-CREATE TABLE book(a int);ALTER TABLE book ADD COLUMN (b int NOT NULL, c int NOT NULL);- changeType: 0+ changeType: 1want:- status: 2code: 404@@ -69,7 +69,7 @@- statement: |-CREATE TABLE book(id int);ALTER TABLE book MODIFY COLUMN id int NOT NULL;- changeType: 0+ changeType: 1want:- status: 2code: 404@@ -82,15 +82,15 @@- statement: |-CREATE TABLE book(id int);ALTER TABLE book MODIFY COLUMN id int PRIMARY KEY;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(uid int);ALTER TABLE book CHANGE COLUMN uid id int PRIMARY KEY;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(uid int);ALTER TABLE book CHANGE COLUMN uid id int NOT NULL;- changeType: 0+ changeType: 1want:- status: 2code: 404@@ -103,7 +103,7 @@- statement: |-CREATE TABLE book(uid int, id int);ALTER TABLE book CHANGE COLUMN uid uid int NOT NULL DEFAULT 0, MODIFY COLUMN id int PRIMARY KEY DEFAULT 0, ADD COLUMN name varchar(20) NOT NULL DEFAULT '';- changeType: 0+ changeType: 1- statement: |-create table all_types(c1 tinyblob not null,@@ -119,4 +119,4 @@c11 long varbinary not null,c12 long varchar not null);- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/mysql/test/column_type_disallow_list.yaml b/backend/plugin/advisor/mysql/test/column_type_disallow_list.yamlindex 8f1f04baf5..dbcc2b6da9 100644--- a/backend/plugin/advisor/mysql/test/column_type_disallow_list.yaml+++ b/backend/plugin/advisor/mysql/test/column_type_disallow_list.yaml@@ -1,7 +1,7 @@- statement: CREATE TABLE t(a int);- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a JSON, b BLOB, c TEXT);- changeType: 0+ changeType: 1want:- status: 2code: 411@@ -14,7 +14,7 @@- statement: |-CREATE TABLE t(d int);ALTER TABLE t add COLUMN (a JSON, b BLOB, c TEXT);- changeType: 0+ changeType: 1want:- status: 2code: 411@@ -27,7 +27,7 @@- statement: |-CREATE TABLE t(d int);ALTER TABLE t ADD COLUMN (a JSON, b JSON);- changeType: 0+ changeType: 1want:- status: 2code: 411@@ -48,7 +48,7 @@- statement: |-CREATE TABLE t(c int, b int);ALTER TABLE t CHANGE COLUMN c a JSON, MODIFY b BLOB;- changeType: 0+ changeType: 1want:- status: 2code: 411@@ -61,7 +61,7 @@- statement: |-CREATE TABLE t(c int, b int);ALTER TABLE t MODIFY COLUMN c JSON;- changeType: 0+ changeType: 1want:- status: 2code: 411diff --git a/backend/plugin/advisor/mysql/test/database_drop_empty_database.yaml b/backend/plugin/advisor/mysql/test/database_drop_empty_database.yamlindex 128f4b56b2..5ff015d406 100644--- a/backend/plugin/advisor/mysql/test/database_drop_empty_database.yaml+++ b/backend/plugin/advisor/mysql/test/database_drop_empty_database.yaml@@ -1,5 +1,5 @@- statement: DROP DATABASE IF EXISTS test;- changeType: 0+ changeType: 1want:- status: 2code: 701diff --git a/backend/plugin/advisor/mysql/test/engine_mysql_use_innodb.yaml b/backend/plugin/advisor/mysql/test/engine_mysql_use_innodb.yamlindex 0d47d6812d..2e2fd17dee 100644--- a/backend/plugin/advisor/mysql/test/engine_mysql_use_innodb.yaml+++ b/backend/plugin/advisor/mysql/test/engine_mysql_use_innodb.yaml@@ -11,7 +11,7 @@UNIQUE KEY uk1(id, name),FOREIGN KEY fk1(roomId) REFERENCES room(id),INDEX idx_userTable_content(content)) ENGINE = CSV COLLATE latin1_bin;- changeType: 0+ changeType: 1want:- status: 2code: 501@@ -45,17 +45,17 @@INDEX idx_user_name(name),UNIQUE KEY uk_user_id_name(id, name)) ENGINE = INNODB COMMENT 'comment';- changeType: 0+ changeType: 1- statement: CREATE TABLE book(id int) ENGINE = INNODB;- changeType: 0+ changeType: 1- statement: CREATE TABLE book(id int);- changeType: 0+ changeType: 1- statement: |CREATE TABLE book(id INT,price INT) ENGINE = CSV;- changeType: 0+ changeType: 1want:- status: 2code: 501@@ -75,7 +75,7 @@id INT,price INT) ENGINE = CSV;- changeType: 0+ changeType: 1want:- status: 2code: 501@@ -90,12 +90,12 @@column: 0endposition: null- statement: ALTER TABLE tech_book ENGINE = INNODB;- changeType: 0+ changeType: 1- statement: |CREATE TABLE teck_book(a INT);CREATE TABLE book(a INT);ALTER TABLE tech_book ENGINE = CSV;- changeType: 0+ changeType: 1want:- status: 2code: 501@@ -106,11 +106,11 @@column: 0endposition: null- statement: SET default_storage_engine=INNODB;- changeType: 0+ changeType: 1- statement: |CREATE TABLE book(a INT);SET default_storage_engine=CSV;- changeType: 0+ changeType: 1want:- status: 2code: 501@@ -122,4 +122,4 @@endposition: null- statement: |SET foreign_key_checks=0;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/mysql/test/index_key_number_limit.yaml b/backend/plugin/advisor/mysql/test/index_key_number_limit.yamlindex c5b7a77b0f..4aae661294 100644--- a/backend/plugin/advisor/mysql/test/index_key_number_limit.yaml+++ b/backend/plugin/advisor/mysql/test/index_key_number_limit.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE t(a int, b int, primary key (a, b));- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int,@@ -8,7 +8,7 @@unique key uk (a, b, b, b, b, b, b),foreign key fk (a, b, b, b, b, b) references t1(a, b, b, b, b, b));- changeType: 0+ changeType: 1want:- status: 2code: 802@@ -38,7 +38,7 @@CREATE TABLE t(a int, b int, c int, d int, e int, f int, g int);CREATE INDEX idx ON t(a, b, c, d, e, f, g);CREATE UNIQUE INDEX uk ON t(a, b, c, d, e, f, g);- changeType: 0+ changeType: 1want:- status: 2code: 802@@ -60,7 +60,7 @@CREATE TABLE t(a int, b int, c int, d int, e int, f int, g int);ALTER TABLE t ADD PRIMARY KEY pk (a, b, c, d, e, f, g);ALTER TABLE t ADD UNIQUE KEY uk (a, b, c, d, e, f, g);- changeType: 0+ changeType: 1want:- status: 2code: 802@@ -81,7 +81,7 @@- statement: |-CREATE TABLE t(a int, b int, c int, d int, e int, f int, g int);ALTER TABLE t ADD FOREIGN KEY uk (a, b, c, d, e, f, g) REFERENCES t1(a, b, c, d, e, f, g)- changeType: 0+ changeType: 1want:- status: 2code: 802@@ -94,4 +94,4 @@- statement: |-CREATE TABLE t(a int, b varchar(255));CREATE FULLTEXT INDEX idx ON t(b, b, b, b, b, b);- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/mysql/test/index_no_duplicate_column.yaml b/backend/plugin/advisor/mysql/test/index_no_duplicate_column.yamlindex 789fa37b59..fb427013ae 100644--- a/backend/plugin/advisor/mysql/test/index_no_duplicate_column.yaml+++ b/backend/plugin/advisor/mysql/test/index_no_duplicate_column.yaml@@ -1,11 +1,11 @@- statement: CREATE TABLE t (a int, PRIMARY KEY (a));- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t (a int,PRIMARY KEY (a, a));- changeType: 0+ changeType: 1want:- status: 2code: 812@@ -28,7 +28,7 @@a int,FOREIGN KEY fk1 (a, a) REFERENCES t1(a, a));- changeType: 0+ changeType: 1want:- status: 2code: 812@@ -43,7 +43,7 @@a int,INDEX idx_a (a, a));- changeType: 0+ changeType: 1want:- status: 2code: 812@@ -57,7 +57,7 @@CREATE TABLE t(a int);CREATE INDEX idx ON t(a);CREATE INDEX idx_a ON t(a, a);- changeType: 0+ changeType: 1want:- status: 2code: 812@@ -71,7 +71,7 @@CREATE TABLE t(a int);CREATE UNIQUE INDEX idx ON t(a);CREATE UNIQUE INDEX idx_a ON t(a, a);- changeType: 0+ changeType: 1want:- status: 2code: 812@@ -85,7 +85,7 @@CREATE TABLE t(a int);ALTER TABLE t ADD INDEX idx (a);ALTER TABLE t ADD INDEX idx_a (a, a);- changeType: 0+ changeType: 1want:- status: 2code: 812@@ -98,7 +98,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD PRIMARY KEY pk_a (a, a);- changeType: 0+ changeType: 1want:- status: 2code: 812@@ -111,12 +111,12 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD PRIMARY KEY pk_a (a);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD UNIQUE KEY uk (a);ALTER TABLE t ADD UNIQUE KEY uk_a (a, a);- changeType: 0+ changeType: 1want:- status: 2code: 812@@ -130,7 +130,7 @@CREATE TABLE t(a int);ALTER TABLE t ADD FOREIGN KEY fk (a) REFERENCES t1(a);ALTER TABLE t ADD FOREIGN KEY fk_a (a, a) REFERENCES t1(a, b);- changeType: 0+ changeType: 1want:- status: 2code: 812diff --git a/backend/plugin/advisor/mysql/test/index_pk_type_limit.yaml b/backend/plugin/advisor/mysql/test/index_pk_type_limit.yamlindex 1aafead339..cd0126984f 100644--- a/backend/plugin/advisor/mysql/test/index_pk_type_limit.yaml+++ b/backend/plugin/advisor/mysql/test/index_pk_type_limit.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE t(id VARCHAR(5) PRIMARY KEY);- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -10,9 +10,9 @@column: 0endposition: null- statement: CREATE TABLE t(id INT PRIMARY KEY);- changeType: 0+ changeType: 1- statement: CREATE TABLE t(id VARCHAR(5), PRIMARY KEY(id));- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -23,7 +23,7 @@column: 0endposition: null- statement: CREATE TABLE t(id INT, id2 VARCHAR(5), id3 VARCHAR(5), PRIMARY KEY(id, id2, id3));- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -42,13 +42,13 @@column: 0endposition: null- statement: CREATE TABLE t(id INT, id2 BIGINT, PRIMARY KEY(id, id2));- changeType: 0+ changeType: 1- statement: CREATE TABLE t(id INT, PRIMARY KEY(id));- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id VARCHAR(5) PRIMARY KEY;- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -61,11 +61,11 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id INT PRIMARY KEY;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id VARCHAR(5), ADD PRIMARY KEY (id);- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -78,7 +78,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id INT, ADD COLUMN id2 VARCHAR(5), ADD COLUMN id3 VARCHAR(5), ADD PRIMARY KEY (id, id2, id3);- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -99,15 +99,15 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id INT, ADD COLUMN id2 BIGINT, ADD PRIMARY KEY (id, id2);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id BIGINT, ADD PRIMARY KEY (id);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id VARCHAR(5));ALTER TABLE t ADD PRIMARY KEY(id);- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -120,7 +120,7 @@- statement: |-CREATE TABLE t(id INT, id2 VARCHAR(5), id3 VARCHAR(5));ALTER TABLE t ADD PRIMARY KEY(id, id2, id3);- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -141,15 +141,15 @@- statement: |-CREATE TABLE t(id INT, id2 BIGINT);ALTER TABLE t ADD PRIMARY KEY(id, id2);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id BIGINT);ALTER TABLE t ADD PRIMARY KEY(id);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id int);ALTER TABLE t MODIFY COLUMN id VARCHAR(5) PRIMARY KEY;- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -162,11 +162,11 @@- statement: |-CREATE TABLE t(id int);ALTER TABLE t MODIFY COLUMN id INT(5) PRIMARY KEY;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id int);ALTER TABLE t CHANGE COLUMN id id2 VARCHAR(5) PRIMARY KEY;- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -179,4 +179,4 @@- statement: |-CREATE TABLE t(id int);ALTER TABLE t CHANGE COLUMN id id2 INT(5) PRIMARY KEY;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/mysql/test/index_primary_key_type_allowlist.yaml b/backend/plugin/advisor/mysql/test/index_primary_key_type_allowlist.yamlindex 8e6c6e5f93..73233d6bcf 100644--- a/backend/plugin/advisor/mysql/test/index_primary_key_type_allowlist.yaml+++ b/backend/plugin/advisor/mysql/test/index_primary_key_type_allowlist.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE t(id VARCHAR(5) PRIMARY KEY);- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -10,9 +10,9 @@column: 0endposition: null- statement: CREATE TABLE t(id INT PRIMARY KEY);- changeType: 0+ changeType: 1- statement: CREATE TABLE t(id VARCHAR(5), PRIMARY KEY(id));- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -23,7 +23,7 @@column: 0endposition: null- statement: CREATE TABLE t(id INT, id2 VARCHAR(5), id3 VARCHAR(5), PRIMARY KEY(id, id2, id3));- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -42,13 +42,13 @@column: 0endposition: null- statement: CREATE TABLE t(id INT, id2 BIGINT, PRIMARY KEY(id, id2));- changeType: 0+ changeType: 1- statement: CREATE TABLE t(id INT, PRIMARY KEY(id));- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id VARCHAR(5) PRIMARY KEY;- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -61,11 +61,11 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id INT PRIMARY KEY;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id VARCHAR(5), ADD PRIMARY KEY (id);- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -78,7 +78,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id INT, ADD COLUMN id2 VARCHAR(5), ADD COLUMN id3 VARCHAR(5), ADD PRIMARY KEY (id, id2, id3);- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -99,15 +99,15 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id INT, ADD COLUMN id2 BIGINT, ADD PRIMARY KEY (id, id2);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id BIGINT, ADD PRIMARY KEY (id);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id VARCHAR(5));ALTER TABLE t ADD PRIMARY KEY(id);- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -120,7 +120,7 @@- statement: |-CREATE TABLE t(id INT, id2 VARCHAR(5), id3 VARCHAR(5));ALTER TABLE t ADD PRIMARY KEY(id, id2, id3);- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -141,15 +141,15 @@- statement: |-CREATE TABLE t(id INT, id2 BIGINT);ALTER TABLE t ADD PRIMARY KEY(id, id2);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id BIGINT);ALTER TABLE t ADD PRIMARY KEY(id);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id int);ALTER TABLE t MODIFY COLUMN id VARCHAR(5) PRIMARY KEY;- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -162,11 +162,11 @@- statement: |-CREATE TABLE t(id int);ALTER TABLE t MODIFY COLUMN id INT(5) PRIMARY KEY;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id int);ALTER TABLE t CHANGE COLUMN id id2 VARCHAR(5) PRIMARY KEY;- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -179,4 +179,4 @@- statement: |-CREATE TABLE t(id int);ALTER TABLE t CHANGE COLUMN id id2 INT(5) PRIMARY KEY;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/mysql/test/index_total_number_limit.yaml b/backend/plugin/advisor/mysql/test/index_total_number_limit.yamlindex 03e1ccae2d..3a50fcda48 100644--- a/backend/plugin/advisor/mysql/test/index_total_number_limit.yaml+++ b/backend/plugin/advisor/mysql/test/index_total_number_limit.yaml@@ -1,14 +1,14 @@- statement: CREATE TABLE t(a int, b int, c int, unique key(a, b, c));- changeType: 0+ changeType: 1- statement: CREATE INDEX idx_id_name on tech_book(id, name);- changeType: 0+ changeType: 1- statement: |-CREATE INDEX idx_id_name_1 on tech_book(id, name);CREATE INDEX idx_id_name_2 on tech_book(id, name);CREATE INDEX idx_id_name_3 on tech_book(id, name);CREATE INDEX idx_id_name_4 on tech_book(id, name);CREATE INDEX idx_id_name_5 on tech_book(id, name);- changeType: 0+ changeType: 1want:- status: 2code: 813@@ -25,7 +25,7 @@CREATE INDEX idx_a_b_3 on t(a, b);CREATE INDEX idx_a_b_4 on t(a, b);CREATE INDEX idx_a_b_5 on t(a, b);- changeType: 0+ changeType: 1want:- status: 2code: 813@@ -45,7 +45,7 @@INDEX idx_a_b_3 (a, b),INDEX idx_a_b_4 (a, b),INDEX idx_a_b_5 (a, b));- changeType: 0+ changeType: 1want:- status: 2code: 813@@ -66,7 +66,7 @@ALTER TABLE t ADD INDEX idx_a_b_3 (a, b);ALTER TABLE t ADD INDEX idx_a_b_4 (a, b);ALTER TABLE t ADD INDEX idx_a_b_5 (a, b);- changeType: 0+ changeType: 1want:- status: 2code: 813diff --git a/backend/plugin/advisor/mysql/test/index_type_allow_list.yaml b/backend/plugin/advisor/mysql/test/index_type_allow_list.yamlindex 80cc604e67..ab0a68b7ab 100644--- a/backend/plugin/advisor/mysql/test/index_type_allow_list.yaml+++ b/backend/plugin/advisor/mysql/test/index_type_allow_list.yaml@@ -4,7 +4,7 @@email VARCHAR(100),INDEX idx_email (email));- changeType: 0+ changeType: 1- statement: |-CREATE TABLE orders (id INT PRIMARY KEY,@@ -13,14 +13,14 @@);CREATE INDEX idx_customer ON orders (customer, (order_number * 2));CREATE INDEX idx_customer_duplicate ON orders (customer, (order_number * 2));- changeType: 0+ changeType: 1- statement: |-CREATE TABLE locations (id INT AUTO_INCREMENT PRIMARY KEY,geom GEOMETRY NOT NULL);CREATE SPATIAL INDEX spatial_index_name ON locations(geom);- changeType: 0+ changeType: 1want:- status: 2code: 816@@ -36,7 +36,7 @@description TEXT NOT NULL);CREATE FULLTEXT INDEX fulltext_index_name ON locations(description);- changeType: 0+ changeType: 1want:- status: 2code: 816diff --git a/backend/plugin/advisor/mysql/test/index_type_no_blob.yaml b/backend/plugin/advisor/mysql/test/index_type_no_blob.yamlindex 9e16396bb9..198e035b44 100644--- a/backend/plugin/advisor/mysql/test/index_type_no_blob.yaml+++ b/backend/plugin/advisor/mysql/test/index_type_no_blob.yaml@@ -11,7 +11,7 @@UNIQUE KEY uk1(id, name),FOREIGN KEY fk1(roomId) REFERENCES room(id),INDEX idx_userTable_content(content)) ENGINE = CSV COLLATE latin1_bin;- changeType: 0+ changeType: 1want:- status: 2code: 804@@ -33,9 +33,9 @@INDEX idx_user_name(name),UNIQUE KEY uk_user_id_name(id, name)) ENGINE = INNODB COMMENT 'comment';- changeType: 0+ changeType: 1- statement: CREATE TABLE t(b BLOB, PRIMARY KEY(b(10)));- changeType: 0+ changeType: 1want:- status: 2code: 804@@ -46,7 +46,7 @@column: 0endposition: null- statement: CREATE TABLE t(b BLOB, mb MEDIUMBLOB, lb LONGBLOB, id INT, PRIMARY KEY(b(1), mb(2), lb(3), id));- changeType: 0+ changeType: 1want:- status: 2code: 804@@ -73,7 +73,7 @@column: 0endposition: null- statement: CREATE TABLE t(b BLOB, mb MEDIUMBLOB, lb LONGBLOB, id INT, UNIQUE INDEX(b(1), mb(2), lb(3), id))- changeType: 0+ changeType: 1want:- status: 2code: 804@@ -100,7 +100,7 @@column: 0endposition: null- statement: CREATE TABLE t(b BLOB, mb MEDIUMBLOB, lb LONGBLOB, id iNT, INDEX(b(1), mb(2), lb(3), id))- changeType: 0+ changeType: 1want:- status: 2code: 804@@ -127,11 +127,11 @@column: 0endposition: null- statement: CREATE TABLE t(id INT, PRIMARY KEY(id))- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN b BLOB, ADD COLUMN id INT, ADD PRIMARY KEY(b(1), id);- changeType: 0+ changeType: 1want:- status: 2code: 804@@ -144,7 +144,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN b BLOB, ADD COLUMN mb MEDIUMBLOB, ADD COLUMN lb LONGBLOB, ADD COLUMN id INT, ADD UNIQUE INDEX(b(1), mb(2), lb(3), id)- changeType: 0+ changeType: 1want:- status: 2code: 804@@ -173,7 +173,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN b BLOB, ADD COLUMN mb MEDIUMBLOB, ADD COLUMN lb LONGBLOB, ADD COLUMN id INT, ADD INDEX(b(1), mb(2), lb(3), id)- changeType: 0+ changeType: 1want:- status: 2code: 804@@ -202,14 +202,14 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN b BLOB, ADD COLUMN mb MEDIUMBLOB, ADD COLUMN lb LONGBLOB, ADD COLUMN id INT, ADD INDEX(id);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(b blob, mb mediumblob, lb longblob, id int);CREATE INDEX idx_b ON t(b(5));CREATE INDEX idx_mb ON t(mb(5));CREATE INDEX idx_lb ON t(lb(5));CREATE INDEX idx_id ON t(id);- changeType: 0+ changeType: 1want:- status: 2code: 804@@ -238,12 +238,12 @@- statement: |-CREATE TABLE t(b blob, mb mediumblob, lb longblob, id int);CREATE INDEX idx_id ON t(id);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(b int, mb mediumblob, lb longblob, id int);ALTER TABLE t MODIFY COLUMN b blob;ALTER TABLE t ADD PRIMARY KEY(b);- changeType: 0+ changeType: 1want:- status: 2code: 804@@ -257,7 +257,7 @@CREATE TABLE t(b int, mb mediumblob, lb longblob, id int);ALTER TABLE t CHANGE COLUMN b d blob;ALTER TABLE t ADD PRIMARY KEY(d);- changeType: 0+ changeType: 1want:- status: 2code: 804diff --git a/backend/plugin/advisor/mysql/test/naming_column.yaml b/backend/plugin/advisor/mysql/test/naming_column.yamlindex 6dd467cca1..d012cc616f 100644--- a/backend/plugin/advisor/mysql/test/naming_column.yaml+++ b/backend/plugin/advisor/mysql/test/naming_column.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE book(id int, creatorId int);- changeType: 0+ changeType: 1want:- status: 2code: 302@@ -10,7 +10,7 @@column: 0endposition: null- statement: CREATE TABLE book(id int, gbhzmtchhsjzyrhdroxmyouwloxqezowdvhcbqalqcgqhfbjnvmhwrbggezmzeusx int);- changeType: 0+ changeType: 1want:- status: 2code: 302@@ -21,12 +21,12 @@column: 0endposition: null- statement: CREATE TABLE book(id int, creator_id int);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(id int, creator_id int);ALTER TABLE book RENAME COLUMN creator_id TO creatorId;ALTER TABLE book CHANGE COLUMN creatorId gbhzmtchhsjzyrhdroxmyouwloxqezowdvhcbqalqcgqhfbjnvmhwrbggezmzeusx int;- changeType: 0+ changeType: 1want:- status: 2code: 302@@ -47,7 +47,7 @@- statement: |ALTER TABLE tech_book RENAME COLUMN id TO creator_id;ALTER TABLE tech_book RENAME COLUMN creator_id TO gbhzmtchhsjzyrhdroxmyouwloxqezowdvhcbqalqcgqhfbjnvmhwrbggezmzeusx;- changeType: 0+ changeType: 1want:- status: 2code: 302@@ -65,7 +65,7 @@updater_id int,updated_ts timestamp);ALTER TABLE book CHANGE COLUMN creator_id creatorId int;- changeType: 0+ changeType: 1want:- status: 2code: 302@@ -78,9 +78,9 @@- statement: |-CREATE TABLE book (id INT);ALTER TABLE book CHANGE COLUMN id creator_id int;- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book DROP COLUMN id;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(id int,@@ -88,7 +88,7 @@created_ts timestamp,updated_ts timestamp);ALTER TABLE book ADD COLUMN contentString varchar(255);- changeType: 0+ changeType: 1want:- status: 2code: 302@@ -105,7 +105,7 @@created_ts timestamp,updated_ts timestamp);ALTER TABLE book ADD COLUMN (personAge INT, contentString varchar(255));- changeType: 0+ changeType: 1want:- status: 2code: 302@@ -133,7 +133,7 @@id int,createdTs timestamp,updatedTs timestamp);- changeType: 0+ changeType: 1want:- status: 2code: 302diff --git a/backend/plugin/advisor/mysql/test/naming_column_auto_increment.yaml b/backend/plugin/advisor/mysql/test/naming_column_auto_increment.yamlindex 5bb651445c..7198964add 100644--- a/backend/plugin/advisor/mysql/test/naming_column_auto_increment.yaml+++ b/backend/plugin/advisor/mysql/test/naming_column_auto_increment.yaml@@ -1,7 +1,7 @@- statement: CREATE TABLE book(id int AUTO_INCREMENT);- changeType: 0+ changeType: 1- statement: CREATE TABLE book(a int AUTO_INCREMENT);- changeType: 0+ changeType: 1want:- status: 2code: 307@@ -12,7 +12,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book ADD COLUMN a int AUTO_INCREMENT;- changeType: 0+ changeType: 1want:- status: 2code: 307@@ -23,7 +23,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book CHANGE COLUMN id a int AUTO_INCREMENT;- changeType: 0+ changeType: 1want:- status: 2code: 307@@ -34,7 +34,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book MODIFY COLUMN name int AUTO_INCREMENT;- changeType: 0+ changeType: 1want:- status: 2code: 307@@ -47,16 +47,16 @@- statement: |CREATE TABLE book(id int);ALTER TABLE tech_book MODIFY COLUMN id int AUTO_INCREMENT;- changeType: 0+ changeType: 1- statement: |CREATE TABLE book(name VARCHAR(255));ALTER TABLE book ADD COLUMN id int AUTO_INCREMENT;- changeType: 0+ changeType: 1- statement: |CREATE TABLE book(a INT, name VARCHAR(255));ALTER TABLE book CHANGE COLUMN a id int AUTO_INCREMENT;- changeType: 0+ changeType: 1- statement: |CREATE TABLE book(name VARCHAR(255));ALTER TABLE book ADD COLUMN (id int AUTO_INCREMENT, a int, b int, c int, d int);- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/mysql/test/naming_identifier_no_keyword.yaml b/backend/plugin/advisor/mysql/test/naming_identifier_no_keyword.yamlindex 0ae486c7bf..334fab27d2 100644--- a/backend/plugin/advisor/mysql/test/naming_identifier_no_keyword.yaml+++ b/backend/plugin/advisor/mysql/test/naming_identifier_no_keyword.yaml@@ -1,7 +1,7 @@- statement: CREATE TABLE `t`(a int);- changeType: 0+ changeType: 1- statement: CREATE TABLE interval(id int);- changeType: 0+ changeType: 1want:- status: 3code: 201@@ -12,7 +12,7 @@column: 13endposition: null- statement: CREATE TABLE execute(id int)- changeType: 0+ changeType: 1want:- status: 2code: 308@@ -23,7 +23,7 @@column: 0endposition: null- statement: CREATE TABLE `execute`(id int)- changeType: 0+ changeType: 1want:- status: 2code: 308@@ -34,7 +34,7 @@column: 0endposition: null- statement: CREATE TABLE `interval`(id int);- changeType: 0+ changeType: 1want:- status: 2code: 308@@ -45,7 +45,7 @@column: 0endposition: null- statement: "CREATE TABLE t(\n id int, \n `current_timestamp` int\n);\n"- changeType: 0+ changeType: 1want:- status: 2code: 308@@ -56,7 +56,7 @@column: 0endposition: null- statement: CREATE TABLE `test`.`interval`(id int);- changeType: 0+ changeType: 1want:- status: 2code: 308diff --git a/backend/plugin/advisor/mysql/test/naming_index_fk.yaml b/backend/plugin/advisor/mysql/test/naming_index_fk.yamlindex 4869b9a5a8..f8dbd2035f 100644--- a/backend/plugin/advisor/mysql/test/naming_index_fk.yaml+++ b/backend/plugin/advisor/mysql/test/naming_index_fk.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE userTable(id INT NOT NULL,name VARCHAR(255) CHARSET ascii,roomId INT,time_created TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW() COMMENT 'comment',time_updated TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW() COMMENT 'comment',content BLOB NOT NULL COMMENT 'comment',json_content JSON NOT NULL COMMENT 'comment',INDEX idx1(name),UNIQUE KEY uk1(id, name),FOREIGN KEY fk1(roomId) REFERENCES room(id),INDEX idx_userTable_content(content)) ENGINE = CSV COLLATE latin1_bin;- changeType: 0+ changeType: 1want:- status: 2code: 305@@ -10,9 +10,9 @@column: 0endposition: null- statement: ALTER TABLE tech_book ADD CONSTRAINT fk_tech_book_author_id_author_id FOREIGN KEY (author_id) REFERENCES author (id);- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book ADD CONSTRAINT fk_author_id FOREIGN KEY (author_id) REFERENCES author (id);- changeType: 0+ changeType: 1want:- status: 2code: 305@@ -23,7 +23,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book ADD CONSTRAINT rvemempmcmmhutaskvcidmwaldtfjdgmcpkhmibtadfydtkexpuzczrrneucthfwk FOREIGN KEY (author_id) REFERENCES author (id);- changeType: 0+ changeType: 1want:- status: 2code: 305@@ -47,21 +47,21 @@author_id INT,FOREIGN KEY fk_book_author_id_author_id (author_id) REFERENCES author (id));- changeType: 0+ changeType: 1- statement: |CREATE TABLE book(id INT,author_id INT,FOREIGN KEY (author_id) REFERENCES author (id));- changeType: 0+ changeType: 1- statement: |CREATE TABLE book(id INT,author_id INT,FOREIGN KEY fk_book_author_id (author_id) REFERENCES author (id));- changeType: 0+ changeType: 1want:- status: 2code: 305diff --git a/backend/plugin/advisor/mysql/test/naming_index_idx.yaml b/backend/plugin/advisor/mysql/test/naming_index_idx.yamlindex f5d100758d..a4e4a8e9c1 100644--- a/backend/plugin/advisor/mysql/test/naming_index_idx.yaml+++ b/backend/plugin/advisor/mysql/test/naming_index_idx.yaml@@ -1,7 +1,7 @@- statement: CREATE INDEX idx_tech_book_id_name ON tech_book(id, name);- changeType: 0+ changeType: 1- statement: CREATE INDEX tech_book_id_name ON tech_book(id, name);- changeType: 0+ changeType: 1want:- status: 2code: 303@@ -12,7 +12,7 @@column: 0endposition: null- statement: CREATE INDEX afvjwsgrbgqzjfrkmbcoxzstznuypasijbbcdykoboredqovetzfcmmqliaelyavw ON tech_book(id, name);- changeType: 0+ changeType: 1want:- status: 2code: 303@@ -31,9 +31,9 @@column: 0endposition: null- statement: ALTER TABLE tech_book RENAME INDEX old_index TO idx_tech_book_id_name;- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book RENAME INDEX old_index TO idx_tech_book;- changeType: 0+ changeType: 1want:- status: 2code: 303@@ -44,9 +44,9 @@column: 0endposition: null- statement: ALTER TABLE tech_book ADD INDEX idx_tech_book_id_name (id, name);- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book ADD INDEX tech_book_id_name (id, name);- changeType: 0+ changeType: 1want:- status: 2code: 303@@ -57,12 +57,12 @@column: 0endposition: null- statement: CREATE TABLE tech_book_copy(id INT PRIMARY KEY, name VARCHAR(20), INDEX idx_tech_book_copy_name (name));- changeType: 0+ changeType: 1- statement: CREATE TABLE tech_book_copy(id INT PRIMARY KEY, name VARCHAR(20), INDEX (name));- changeType: 0+ changeType: 1- statement: CREATE TABLE tech_book_copy(id INT PRIMARY KEY, name VARCHAR(20), UNIQUE INDEX (name));- changeType: 0+ changeType: 1- statement: CREATE TABLE tech_book_copy(id INT PRIMARY KEY, name VARCHAR(20), FULLTEXT INDEX (name));- changeType: 0+ changeType: 1- statement: CREATE TABLE tech_book_copy(id INT PRIMARY KEY, name VARCHAR(20), SPATIAL INDEX (name));- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/mysql/test/naming_index_uk.yaml b/backend/plugin/advisor/mysql/test/naming_index_uk.yamlindex a6652d623d..0a0e310658 100644--- a/backend/plugin/advisor/mysql/test/naming_index_uk.yaml+++ b/backend/plugin/advisor/mysql/test/naming_index_uk.yaml@@ -1,9 +1,9 @@- statement: CREATE UNIQUE INDEX uk_tech_book_id_name ON tech_book(id, name);- changeType: 0+ changeType: 1- statement: |CREATE UNIQUE INDEX uk_tech_book_id_name ON tech_book(id, name);CREATE UNIQUE INDEX tech_book_id_name ON tech_book(id, name);- changeType: 0+ changeType: 1want:- status: 2code: 304@@ -16,7 +16,7 @@- statement: |CREATE UNIQUE INDEX uk_tech_book_id_name ON tech_book(id, name);CREATE UNIQUE INDEX qtzmquwvlnttctfluoouxelxeliltcfzzstrtyocogwwyiyrflmrkbhbfasynlacy ON tech_book(id, name)- changeType: 0+ changeType: 1want:- status: 2code: 304@@ -35,11 +35,11 @@column: 0endposition: null- statement: ALTER TABLE tech_book ADD UNIQUE uk_tech_book_id_name (id, name);- changeType: 0+ changeType: 1- statement: |CREATE TABLE t1(a INT);ALTER TABLE tech_book ADD UNIQUE tech_book_id_name (id, name);- changeType: 0+ changeType: 1want:- status: 2code: 304@@ -50,11 +50,11 @@column: 0endposition: null- statement: ALTER TABLE tech_book RENAME INDEX old_uk TO uk_tech_book_id_name;- changeType: 0+ changeType: 1- statement: |CREATE TABLE t1(a INT);ALTER TABLE tech_book RENAME INDEX old_uk TO uk_tech_book;- changeType: 0+ changeType: 1want:- status: 2code: 304@@ -65,18 +65,18 @@column: 0endposition: null- statement: CREATE TABLE book(id INT PRIMARY KEY, name VARCHAR(20), UNIQUE INDEX uk_book_name (name));- changeType: 0+ changeType: 1- statement: |CREATE TABLE book(id INT PRIMARY KEY,name VARCHAR(20),UNIQUE KEY (name));- changeType: 0+ changeType: 1- statement: |CREATE TABLE book(id INT PRIMARY KEY,name VARCHAR(20),UNIQUE INDEX (name));- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/mysql/test/naming_table.yaml b/backend/plugin/advisor/mysql/test/naming_table.yamlindex 76d4d93ecf..a773e094f3 100644--- a/backend/plugin/advisor/mysql/test/naming_table.yaml+++ b/backend/plugin/advisor/mysql/test/naming_table.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE techBook(id int, name varchar(255));- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -10,9 +10,9 @@column: 0endposition: null- statement: CREATE TABLE tech_book_copy(id int, name varchar(255));- changeType: 0+ changeType: 1- statement: CREATE TABLE cjnubexocfhqoogdmihudyahmmghviqkzvpixnwvxtxumvuannpwdcbtsgwrvzpde(id int, name varchar(255));- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -25,7 +25,7 @@- statement: |CREATE TABLE book(a INT);ALTER TABLE book RENAME TO TechBook;- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -38,11 +38,11 @@- statement: |CREATE TABLE book(a INT);ALTER TABLE book RENAME TO tech_book_copy;- changeType: 0+ changeType: 1- statement: |CREATE TABLE book (a INT);RENAME TABLE book TO tech_book_copy, tech_book_copy TO LiteraryBook;- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -56,7 +56,7 @@CREATE TABLE literary_book(a int);CREATE TABLE book(a int);RENAME TABLE book TO TechBook, literary_book TO LiteraryBook;- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -78,4 +78,4 @@CREATE TABLE literary_book(a int);CREATE TABLE book(a int);RENAME TABLE book TO tech_book_copy, literary_book TO literary_book_copy;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/mysql/test/schema_backward_compatibility.yaml b/backend/plugin/advisor/mysql/test/schema_backward_compatibility.yamlindex b98168eea3..d549c9df14 100644--- a/backend/plugin/advisor/mysql/test/schema_backward_compatibility.yaml+++ b/backend/plugin/advisor/mysql/test/schema_backward_compatibility.yaml@@ -1,5 +1,5 @@- statement: ALTER TABLE tech_book CHANGE name f2 TEXT;- changeType: 0+ changeType: 1want:- status: 2code: 111@@ -10,7 +10,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book MODIFY name TEXT;- changeType: 0+ changeType: 1want:- status: 2code: 111@@ -21,7 +21,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book MODIFY name TEXT NULL;- changeType: 0+ changeType: 1want:- status: 2code: 111@@ -32,7 +32,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book MODIFY name TEXT NOT NULL;- changeType: 0+ changeType: 1want:- status: 2code: 111@@ -43,7 +43,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book MODIFY name TEXT COMMENT 'bla';- changeType: 0+ changeType: 1want:- status: 2code: 111diff --git a/backend/plugin/advisor/mysql/test/statement_affected_row_limit.yaml b/backend/plugin/advisor/mysql/test/statement_affected_row_limit.yamlindex ab25046473..cc7cd62f04 100644--- a/backend/plugin/advisor/mysql/test/statement_affected_row_limit.yaml+++ b/backend/plugin/advisor/mysql/test/statement_affected_row_limit.yaml@@ -1,4 +1,4 @@- statement: DELETE FROM tech_book WHERE a > 1;- changeType: 0+ changeType: 1- statement: UPDATE tech_book SET id = 1;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/mysql/test/statement_disallow_commit.yaml b/backend/plugin/advisor/mysql/test/statement_disallow_commit.yamlindex 10735b4545..66ce58abf6 100644--- a/backend/plugin/advisor/mysql/test/statement_disallow_commit.yaml+++ b/backend/plugin/advisor/mysql/test/statement_disallow_commit.yaml@@ -2,7 +2,7 @@START TRANSACTION;CREATE TABLE techBook(id int, name varchar(255));COMMIT;- changeType: 0+ changeType: 1want:- status: 2code: 206@@ -20,7 +20,7 @@START TRANSACTION;INSERT INTO techBook(id, name) VALUES(1, "book");COMMIT;- changeType: 0+ changeType: 1want:- status: 2code: 206diff --git a/backend/plugin/advisor/mysql/test/statement_disallow_limit.yaml b/backend/plugin/advisor/mysql/test/statement_disallow_limit.yamlindex d75a8cf313..0204ec49e3 100644--- a/backend/plugin/advisor/mysql/test/statement_disallow_limit.yaml+++ b/backend/plugin/advisor/mysql/test/statement_disallow_limit.yaml@@ -1,9 +1,9 @@- statement: INSERT INTO tech_book SELECT * FROM tech_book;- changeType: 0+ changeType: 1- statement: |INSERT INTO tech_book SELECT * FROM tech_book;INSERT INTO tech_book SELECT * FROM tech_book LIMIT 1;- changeType: 0+ changeType: 1want:- status: 2code: 1103@@ -16,7 +16,7 @@- statement: |INSERT INTO tech_book SELECT * FROM tech_book;INSERT INTO tech_book SELECT * FROM tech_book UNION SELECT * FROM tech_book LIMIT 1;- changeType: 0+ changeType: 1want:- status: 2code: 1103@@ -29,7 +29,7 @@- statement: |INSERT INTO tech_book SELECT * FROM tech_book;INSERT INTO tech_book SELECT * FROM tech_book UNION SELECT * FROM tech_book LIMIT 1;- changeType: 0+ changeType: 1want:- status: 2code: 1103@@ -42,7 +42,7 @@- statement: |UPDATE tech_book SET name = 'my name';UPDATE tech_book SET name = 'my name' LIMIT 10;- changeType: 0+ changeType: 1want:- status: 2code: 1102@@ -55,7 +55,7 @@- statement: |DELETE FROM tech_book;DELETE FROM tech_book LIMIT 10;- changeType: 0+ changeType: 1want:- status: 2code: 1106diff --git a/backend/plugin/advisor/mysql/test/statement_disallow_order_by.yaml b/backend/plugin/advisor/mysql/test/statement_disallow_order_by.yamlindex 0a662ac6cc..7d2010f4a1 100644--- a/backend/plugin/advisor/mysql/test/statement_disallow_order_by.yaml+++ b/backend/plugin/advisor/mysql/test/statement_disallow_order_by.yaml@@ -1,9 +1,9 @@- statement: INSERT INTO tech_book values(1, 'a');- changeType: 0+ changeType: 1- statement: |-UPDATE tech_book SET name = 'my name';UPDATE tech_book SET name = 'my name' ORDER BY id;- changeType: 0+ changeType: 1want:- status: 2code: 1104@@ -16,7 +16,7 @@- statement: |-DELETE FROM tech_book;DELETE FROM tech_book ORDER BY id;- changeType: 0+ changeType: 1want:- status: 2code: 1105diff --git a/backend/plugin/advisor/mysql/test/statement_dml_dry_run.yaml b/backend/plugin/advisor/mysql/test/statement_dml_dry_run.yamlindex f7d9ebe59b..e353b15447 100644--- a/backend/plugin/advisor/mysql/test/statement_dml_dry_run.yaml+++ b/backend/plugin/advisor/mysql/test/statement_dml_dry_run.yaml@@ -1,6 +1,6 @@- statement: INSERT INTO tech_book values(1, 'zp');- changeType: 0+ changeType: 1- statement: DELETE FROM tech_book;- changeType: 0+ changeType: 1- statement: UPDATE tech_book SET name = 'xz' WHERE id = 1;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/mysql/test/statement_insert_disallow_order_by_rand.yaml b/backend/plugin/advisor/mysql/test/statement_insert_disallow_order_by_rand.yamlindex e493e9f0a5..4d9d503c4a 100644--- a/backend/plugin/advisor/mysql/test/statement_insert_disallow_order_by_rand.yaml+++ b/backend/plugin/advisor/mysql/test/statement_insert_disallow_order_by_rand.yaml@@ -1,9 +1,9 @@- statement: INSERT INTO tech_book VALUES(1, "a");- changeType: 0+ changeType: 1- statement: |-INSERT INTO tech_book VALUES(1, "a");INSERT INTO tech_book SELECT * FROM tech_book ORDER BY rand();- changeType: 0+ changeType: 1want:- status: 2code: 1108@@ -16,7 +16,7 @@- statement: |-INSERT INTO tech_book VALUES(1, "a");INSERT INTO tech_book SELECT * FROM tech_book ORDER BY RAND() LIMIT 1;- changeType: 0+ changeType: 1want:- status: 2code: 1108diff --git a/backend/plugin/advisor/mysql/test/statement_insert_must_specify_column.yaml b/backend/plugin/advisor/mysql/test/statement_insert_must_specify_column.yamlindex aec6059ac1..0336efc79e 100644--- a/backend/plugin/advisor/mysql/test/statement_insert_must_specify_column.yaml+++ b/backend/plugin/advisor/mysql/test/statement_insert_must_specify_column.yaml@@ -1,5 +1,5 @@- statement: INSERT INTO t_copy SELECT * FROM t;- changeType: 0+ changeType: 1want:- status: 2code: 1107@@ -10,9 +10,9 @@column: 0endposition: null- statement: INSERT INTO tech_book(id, name) VALUES (1, '1');- changeType: 0+ changeType: 1- statement: "INSERT INTO tech_book(id, name) VALUES (1, '1'); \nINSERT INTO tech_book VALUES (1, '1');"- changeType: 0+ changeType: 1want:- status: 2code: 1107diff --git a/backend/plugin/advisor/mysql/test/statement_insert_row_limit.yaml b/backend/plugin/advisor/mysql/test/statement_insert_row_limit.yamlindex fc71314f83..a363227dcc 100644--- a/backend/plugin/advisor/mysql/test/statement_insert_row_limit.yaml+++ b/backend/plugin/advisor/mysql/test/statement_insert_row_limit.yaml@@ -1,9 +1,9 @@- statement: INSERT INTO tech_book values(1, 'a');- changeType: 0+ changeType: 1- statement: |INSERT INTO tech_book values(1, 'a');INSERT INTO tech_book values(1, 'a'), (2, 'b'), (3, 'c'), (4, 'd'), (5, 'e'), (6, 'f');- changeType: 0+ changeType: 1want:- status: 2code: 1101@@ -14,4 +14,4 @@column: 0endposition: null- statement: INSERT INTO tech_book SELECT * FROM tech_book;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/mysql/test/statement_max_execution_time.yaml b/backend/plugin/advisor/mysql/test/statement_max_execution_time.yamlindex 41a4f08aa1..1fb17fcde6 100644--- a/backend/plugin/advisor/mysql/test/statement_max_execution_time.yaml+++ b/backend/plugin/advisor/mysql/test/statement_max_execution_time.yaml@@ -1,9 +1,9 @@- statement: SET MAX_EXECUTION_TIME = 1000; SELECT * FROM employee;- changeType: 0+ changeType: 1- statement: SET GLOBAL max_execution_time = 10; SELECT * FROM employee;- changeType: 0+ changeType: 1- statement: SELECT * FROM employee; SET max_execution_time = 1000;- changeType: 0+ changeType: 1want:- status: 2code: 235@@ -12,7 +12,7 @@startposition: nullendposition: null- statement: SELECT * FROM t;- changeType: 0+ changeType: 1want:- status: 2code: 235diff --git a/backend/plugin/advisor/mysql/test/statement_maximum_join_table_count.yaml b/backend/plugin/advisor/mysql/test/statement_maximum_join_table_count.yamlindex 0584bedb9e..e308cbffa5 100644--- a/backend/plugin/advisor/mysql/test/statement_maximum_join_table_count.yaml+++ b/backend/plugin/advisor/mysql/test/statement_maximum_join_table_count.yaml@@ -1,7 +1,7 @@- statement: SELECT * FROM t;- changeType: 0+ changeType: 1- statement: select name from hello join world on hello.id = world.id join baby on world.id = baby.id;- changeType: 0+ changeType: 1want:- status: 2code: 223diff --git a/backend/plugin/advisor/mysql/test/statement_maximum_limit_value.yaml b/backend/plugin/advisor/mysql/test/statement_maximum_limit_value.yamlindex 2a5837919e..7c53075e8d 100644--- a/backend/plugin/advisor/mysql/test/statement_maximum_limit_value.yaml+++ b/backend/plugin/advisor/mysql/test/statement_maximum_limit_value.yaml@@ -1,6 +1,6 @@- statement: |SELECT * FROM employee LIMIT 1000000;- changeType: 0+ changeType: 1want:- status: 2code: 222diff --git a/backend/plugin/advisor/mysql/test/statement_merge_alter_table.yaml b/backend/plugin/advisor/mysql/test/statement_merge_alter_table.yamlindex 22f1f823b5..7f8182b0c1 100644--- a/backend/plugin/advisor/mysql/test/statement_merge_alter_table.yaml+++ b/backend/plugin/advisor/mysql/test/statement_merge_alter_table.yaml@@ -1,9 +1,9 @@- statement: ALTER TABLE tech_book ADD COLUMN a int;- changeType: 0+ changeType: 1- statement: |-ALTER TABLE tech_book ADD COLUMN a int;ALTER TABLE tech_book CHANGE COLUMN a c int;- changeType: 0+ changeType: 1want:- status: 2code: 207@@ -18,7 +18,7 @@ALTER TABLE tech_book ADD COLUMN b int;ALTER TABLE t ADD COLUMN b int;ALTER TABLE tech_book MODIFY COLUMN b varchar(255);- changeType: 0+ changeType: 1want:- status: 2code: 207@@ -41,7 +41,7 @@ALTER TABLE tech_book ADD COLUMN a int;ALTER TABLE tech_book ADD COLUMN b int;ALTER TABLE t ADD COLUMN b int;- changeType: 0+ changeType: 1want:- status: 2code: 207diff --git a/backend/plugin/advisor/mysql/test/statement_require_algorithm_option.yaml b/backend/plugin/advisor/mysql/test/statement_require_algorithm_option.yamlindex 91ff3cf5d3..f7790e095e 100644--- a/backend/plugin/advisor/mysql/test/statement_require_algorithm_option.yaml+++ b/backend/plugin/advisor/mysql/test/statement_require_algorithm_option.yaml@@ -1,11 +1,11 @@- statement: |CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN c INT, ALGORITHM=INSTANT, LOCK=NONE;- changeType: 0+ changeType: 1- statement: |CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN c INT;- changeType: 0+ changeType: 1want:- status: 2code: 236diff --git a/backend/plugin/advisor/mysql/test/statement_require_lock_option.yaml b/backend/plugin/advisor/mysql/test/statement_require_lock_option.yamlindex 78593a9e3b..4bd9ebca01 100644--- a/backend/plugin/advisor/mysql/test/statement_require_lock_option.yaml+++ b/backend/plugin/advisor/mysql/test/statement_require_lock_option.yaml@@ -1,11 +1,11 @@- statement: |CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN c INT, ALGORITHM=INSTANT, LOCK=NONE;- changeType: 0+ changeType: 1- statement: |CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN c INT;- changeType: 0+ changeType: 1want:- status: 2code: 237@@ -19,7 +19,7 @@CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN c INT, LOCK=NONE;ALTER TABLE t ADD COLUMN d INT;- changeType: 0+ changeType: 1want:- status: 2code: 237diff --git a/backend/plugin/advisor/mysql/test/statement_select_no_select_all.yaml b/backend/plugin/advisor/mysql/test/statement_select_no_select_all.yamlindex 899ce92940..99f2aedd4b 100644--- a/backend/plugin/advisor/mysql/test/statement_select_no_select_all.yaml+++ b/backend/plugin/advisor/mysql/test/statement_select_no_select_all.yaml@@ -1,5 +1,5 @@- statement: SELECT * FROM t;- changeType: 0+ changeType: 1want:- status: 2code: 203@@ -10,12 +10,12 @@column: 0endposition: null- statement: SELECT a, b FROM t;- changeType: 0+ changeType: 1- statement: |SELECT a, b FROM t;SELECT * FROM t;SELECT a, b FROM (SELECT * from t1 JOIN t2) t;- changeType: 0+ changeType: 1want:- status: 2code: 203@@ -38,7 +38,7 @@SELECT * FROM t1UNIONSELECT * FROM t2;- changeType: 0+ changeType: 1want:- status: 2code: 203@@ -67,7 +67,7 @@WITH cte AS (SELECT * FROM a) SELECT * FROM cte;- changeType: 0+ changeType: 1want:- status: 2code: 203@@ -96,7 +96,7 @@SELECT *FROM aINNER JOIN b USING(id);- changeType: 0+ changeType: 1want:- status: 2code: 203diff --git a/backend/plugin/advisor/mysql/test/statement_where_disallow_functions_and_calculations.yaml b/backend/plugin/advisor/mysql/test/statement_where_disallow_functions_and_calculations.yamlindex 26519d1435..ef9e4a3fba 100644--- a/backend/plugin/advisor/mysql/test/statement_where_disallow_functions_and_calculations.yaml+++ b/backend/plugin/advisor/mysql/test/statement_where_disallow_functions_and_calculations.yaml@@ -1,5 +1,5 @@- statement: SELECT * FROM employee WHERE id = RAND();- changeType: 0+ changeType: 1want:- status: 2code: 1702diff --git a/backend/plugin/advisor/mysql/test/statement_where_maximum_logical_operator_count.yaml b/backend/plugin/advisor/mysql/test/statement_where_maximum_logical_operator_count.yamlindex df77aa9281..2b7e34d330 100644--- a/backend/plugin/advisor/mysql/test/statement_where_maximum_logical_operator_count.yaml+++ b/backend/plugin/advisor/mysql/test/statement_where_maximum_logical_operator_count.yaml@@ -1,5 +1,5 @@- statement: SELECT * FROM employee WHERE id IN (1, 2, 3, 4, 5);- changeType: 0+ changeType: 1want:- status: 2code: 225@@ -10,7 +10,7 @@column: 0endposition: null- statement: SELECT * FROM employee WHERE id = 1 OR id = 2 OR id = 3 OR id = 4 OR id = 5;- changeType: 0+ changeType: 1want:- status: 2code: 225diff --git a/backend/plugin/advisor/mysql/test/statement_where_no_equal_null.yaml b/backend/plugin/advisor/mysql/test/statement_where_no_equal_null.yamlindex 4cc571dbd2..d779003f7f 100644--- a/backend/plugin/advisor/mysql/test/statement_where_no_equal_null.yaml+++ b/backend/plugin/advisor/mysql/test/statement_where_no_equal_null.yaml@@ -1,12 +1,12 @@- statement: |SELECT * FROM employee WHERE name = 'Jack' AND id IS NULL;- changeType: 0+ changeType: 1- statement: |UPDATE employee SET name = NULL;- changeType: 0+ changeType: 1- statement: |SELECT * FROM t WHERE name = 'test' AND id = NULL;- changeType: 0+ changeType: 1want:- status: 2code: 221diff --git a/backend/plugin/advisor/mysql/test/statement_where_no_leading_wildcard_like.yaml b/backend/plugin/advisor/mysql/test/statement_where_no_leading_wildcard_like.yamlindex b6aeb93089..2263740066 100644--- a/backend/plugin/advisor/mysql/test/statement_where_no_leading_wildcard_like.yaml+++ b/backend/plugin/advisor/mysql/test/statement_where_no_leading_wildcard_like.yaml@@ -1,6 +1,6 @@- statement: |DELETE FROM tech_book WHERE name like "%abc";- changeType: 0+ changeType: 1want:- status: 2code: 204@@ -13,11 +13,11 @@- statement: |CREATE TABLE t (id INT);SELECT * FROM t WHERE a LIKE 'abc%';- changeType: 0+ changeType: 1- statement: |CREATE TABLE t (id INT);SELECT * FROM t WHERE a LIKE '%abc';- changeType: 0+ changeType: 1want:- status: 2code: 204@@ -30,7 +30,7 @@- statement: |CREATE TABLE t (id INT);SELECT * FROM t WHERE a LIKE 'abc' OR a LIKE '%abc';- changeType: 0+ changeType: 1want:- status: 2code: 204@@ -46,7 +46,7 @@FROM tWHERE a LIKE '%acc'OR a LIKE '%abc';- changeType: 0+ changeType: 1want:- status: 2code: 204@@ -80,7 +80,7 @@WHERE a LIKE '%acc'OR a LIKE '%abc') t1;- changeType: 0+ changeType: 1want:- status: 2code: 204diff --git a/backend/plugin/advisor/mysql/test/statement_where_require_select.yaml b/backend/plugin/advisor/mysql/test/statement_where_require_select.yamlindex e1f572551a..3296b24a00 100644--- a/backend/plugin/advisor/mysql/test/statement_where_require_select.yaml+++ b/backend/plugin/advisor/mysql/test/statement_where_require_select.yaml@@ -1,11 +1,11 @@- statement: |CREATE TABLE book(id INT);INSERT INTO book(id) values (1);- changeType: 0+ changeType: 1- statement: |CREATE TABLE book(id INT);SELECT id FROM book;- changeType: 0+ changeType: 1want:- status: 2code: 202@@ -18,7 +18,7 @@- statement: |CREATE TABLE book(id INT);SELECT id FROM book WHERE id > 0;- changeType: 0+ changeType: 1- statement: |CREATE TABLE book(id INT);SELECT id@@ -27,7 +27,7 @@SELECT max(id)FROM book);- changeType: 0+ changeType: 1want:- status: 2code: 202@@ -45,4 +45,4 @@endposition: null- statement: |SELECT CURDATE();- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/mysql/test/statement_where_require_update_delete.yaml b/backend/plugin/advisor/mysql/test/statement_where_require_update_delete.yamlindex 89839d0d3d..3f538f3f71 100644--- a/backend/plugin/advisor/mysql/test/statement_where_require_update_delete.yaml+++ b/backend/plugin/advisor/mysql/test/statement_where_require_update_delete.yaml@@ -1,11 +1,11 @@- statement: |CREATE TABLE book(id INT);INSERT INTO book(id) values (1);- changeType: 0+ changeType: 1- statement: |CREATE TABLE book(id INT);DELETE FROM book;- changeType: 0+ changeType: 1want:- status: 2code: 202@@ -18,7 +18,7 @@- statement: |CREATE TABLE book(id INT);UPDATE book SET id = 1;- changeType: 0+ changeType: 1want:- status: 2code: 202@@ -31,8 +31,8 @@- statement: |CREATE TABLE book(id INT);DELETE FROM book WHERE id > 0;- changeType: 0+ changeType: 1- statement: |CREATE TABLE book(id INT);UPDATE book SET id = 1 WHERE id > 10;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/mysql/test/system_charset_allowlist.yaml b/backend/plugin/advisor/mysql/test/system_charset_allowlist.yamlindex d1dbb6b51a..a9f954d259 100644--- a/backend/plugin/advisor/mysql/test/system_charset_allowlist.yaml+++ b/backend/plugin/advisor/mysql/test/system_charset_allowlist.yaml@@ -1,9 +1,9 @@- statement: CREATE TABLE t(a int) CHARSET utf8mb4;- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a varchar(255));- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a int) CHARSET ascii;- changeType: 0+ changeType: 1want:- status: 2code: 1001@@ -16,7 +16,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t CHARSET ascii;- changeType: 0+ changeType: 1want:- status: 2code: 1001@@ -27,7 +27,7 @@column: 0endposition: null- statement: ALTER DATABASE test CHARSET ascii;- changeType: 0+ changeType: 1want:- status: 2code: 1001@@ -38,7 +38,7 @@column: 0endposition: null- statement: CREATE TABLE t(a varchar(255) CHARSET ascii);- changeType: 0+ changeType: 1want:- status: 2code: 1001@@ -51,7 +51,7 @@- statement: |-CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN a varchar(255) CHARSET ascii;- changeType: 0+ changeType: 1want:- status: 2code: 1001@@ -64,7 +64,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t MODIFY COLUMN a varchar(255) CHARSET ascii;- changeType: 0+ changeType: 1want:- status: 2code: 1001@@ -77,7 +77,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t CHANGE COLUMN a a varchar(255) CHARSET ascii;- changeType: 0+ changeType: 1want:- status: 2code: 1001@@ -88,4 +88,4 @@column: 0endposition: null- statement: /* this is a comment */- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/mysql/test/system_collation_allowlist.yaml b/backend/plugin/advisor/mysql/test/system_collation_allowlist.yamlindex e6a339ca19..76e9aca1de 100644--- a/backend/plugin/advisor/mysql/test/system_collation_allowlist.yaml+++ b/backend/plugin/advisor/mysql/test/system_collation_allowlist.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE test(id INT PRIMARY KEY COMMENT 'comment',name VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'comment',room_id INT NOT NULL DEFAULT 0 COMMENT 'comment',creator_id INT NOT NULL DEFAULT 0 COMMENT 'comment',created_ts TIMESTAMP NOT NULL DEFAULT NOW() COMMENT 'comment',updater_id INT NOT NULL DEFAULT 0 COMMENT 'comment',updated_ts TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW() COMMENT 'comment',INDEX idx_test_name(name),UNIQUE KEY uk_test_id_name(id, name)) ENGINE = INNODB COMMENT 'comment'- changeType: 0+ changeType: 1- statement: |CREATE TABLE userTable(id INT NOT NULL,@@ -13,7 +13,7 @@UNIQUE KEY uk1(id, name),FOREIGN KEY fk1(roomId) REFERENCES room(id),INDEX idx_userTable_content(content)) ENGINE = CSV COLLATE latin1_bin;- changeType: 0+ changeType: 1want:- status: 2code: 1201@@ -47,9 +47,9 @@INDEX idx_user_name(name),UNIQUE KEY uk_user_id_name(id, name)) ENGINE = INNODB COMMENT 'comment';- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a int) COLLATE utf8mb4_polish_ci;- changeType: 0+ changeType: 1want:- status: 2code: 1201@@ -60,9 +60,9 @@column: 0endposition: null- statement: CREATE TABLE t(a varchar(255));- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a int) COLLATE latin1_bin;- changeType: 0+ changeType: 1want:- status: 2code: 1201@@ -75,7 +75,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t COLLATE latin1_bin;- changeType: 0+ changeType: 1want:- status: 2code: 1201@@ -86,7 +86,7 @@column: 0endposition: null- statement: ALTER DATABASE test COLLATE latin1_bin;- changeType: 0+ changeType: 1want:- status: 2code: 1201@@ -97,7 +97,7 @@column: 0endposition: null- statement: CREATE TABLE t(a varchar(255) CHARACTER SET latin1 COLLATE latin1_bin);- changeType: 0+ changeType: 1want:- status: 2code: 1201@@ -110,7 +110,7 @@- statement: |-CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN a varchar(255) CHARACTER SET latin1 COLLATE latin1_bin;- changeType: 0+ changeType: 1want:- status: 2code: 1201@@ -123,7 +123,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t MODIFY COLUMN a varchar(255) CHARACTER SET latin1 COLLATE latin1_bin;- changeType: 0+ changeType: 1want:- status: 2code: 1201@@ -136,7 +136,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t CHANGE COLUMN a a varchar(255) CHARACTER SET latin1 COLLATE latin1_bin;- changeType: 0+ changeType: 1want:- status: 2code: 1201diff --git a/backend/plugin/advisor/mysql/test/system_event_disallow_create.yaml b/backend/plugin/advisor/mysql/test/system_event_disallow_create.yamlindex a103b3a251..12c81c8e6e 100644--- a/backend/plugin/advisor/mysql/test/system_event_disallow_create.yaml+++ b/backend/plugin/advisor/mysql/test/system_event_disallow_create.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE t(a int);- changeType: 0+ changeType: 1- statement: |-CREATE EVENT daily_backupON SCHEDULE@@ -9,7 +9,7 @@INSERT INTO backup_table (backup_date, data)SELECT NOW(), dataFROM main_table;- changeType: 0+ changeType: 1want:- status: 2code: 1501diff --git a/backend/plugin/advisor/mysql/test/system_function_disallow_create.yaml b/backend/plugin/advisor/mysql/test/system_function_disallow_create.yamlindex a3fc6d37e1..506793652e 100644--- a/backend/plugin/advisor/mysql/test/system_function_disallow_create.yaml+++ b/backend/plugin/advisor/mysql/test/system_function_disallow_create.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE t(a int);- changeType: 0+ changeType: 1- statement: |-CREATE FUNCTION add_two_numbers(a INT, b INT)RETURNS INT@@ -8,7 +8,7 @@SET result = a + b;RETURN result;END;- changeType: 0+ changeType: 1want:- status: 2code: 1701diff --git a/backend/plugin/advisor/mysql/test/system_function_disallowed_list.yaml b/backend/plugin/advisor/mysql/test/system_function_disallowed_list.yamlindex ed90f94447..0268c9d73f 100644--- a/backend/plugin/advisor/mysql/test/system_function_disallowed_list.yaml+++ b/backend/plugin/advisor/mysql/test/system_function_disallowed_list.yaml@@ -1,7 +1,7 @@- statement: CREATE TABLE t(a int);- changeType: 0+ changeType: 1- statement: SELECT RAND();- changeType: 0+ changeType: 1want:- status: 2code: 1702@@ -17,7 +17,7 @@name VARCHAR(255),age INT);- changeType: 0+ changeType: 1want:- status: 2code: 1702@@ -33,7 +33,7 @@column: 0endposition: null- statement: SELECT SLEEP(5);- changeType: 0+ changeType: 1want:- status: 2code: 1702diff --git a/backend/plugin/advisor/mysql/test/system_procedure_disallow_create.yaml b/backend/plugin/advisor/mysql/test/system_procedure_disallow_create.yamlindex aead0d2a5a..a668fb97b5 100644--- a/backend/plugin/advisor/mysql/test/system_procedure_disallow_create.yaml+++ b/backend/plugin/advisor/mysql/test/system_procedure_disallow_create.yaml@@ -1,11 +1,11 @@- statement: CREATE TABLE t(a int);- changeType: 0+ changeType: 1- statement: |-CREATE PROCEDURE simpleProcedure()BEGINSELECT 'Hello, World!' AS Message;END;- changeType: 0+ changeType: 1want:- status: 2code: 1401diff --git a/backend/plugin/advisor/mysql/test/system_view_disallow_create.yaml b/backend/plugin/advisor/mysql/test/system_view_disallow_create.yamlindex 7a34cd0043..9b8ff42f47 100644--- a/backend/plugin/advisor/mysql/test/system_view_disallow_create.yaml+++ b/backend/plugin/advisor/mysql/test/system_view_disallow_create.yaml@@ -1,7 +1,7 @@- statement: CREATE TABLE t(a int);- changeType: 0+ changeType: 1- statement: CREATE VIEW get_one AS SELECT 1;- changeType: 0+ changeType: 1want:- status: 2code: 1601diff --git a/backend/plugin/advisor/mysql/test/table_comment.yaml b/backend/plugin/advisor/mysql/test/table_comment.yamlindex c98b725457..8ebbfb6fe6 100644--- a/backend/plugin/advisor/mysql/test/table_comment.yaml+++ b/backend/plugin/advisor/mysql/test/table_comment.yaml@@ -1,7 +1,7 @@- statement: |-CREATE TABLE a(b INT) COMMENT 'table';CREATE TABLE t(a int) COMMENT 'some comments';- changeType: 0+ changeType: 1want:- status: 2code: 1301@@ -14,7 +14,7 @@- statement: |-CREATE TABLE a(b INT) COMMENT 'table';CREATE TABLE t(a int);- changeType: 0+ changeType: 1want:- status: 2code: 1032@@ -27,7 +27,7 @@- statement: |-CREATE TABLE a(b INT) COMMENT 'table';CREATE TABLE t(a int) COMMENT 'sdlfkjalkseblkjduafelbnlsdfkljayue';- changeType: 0+ changeType: 1want:- status: 2code: 1301diff --git a/backend/plugin/advisor/mysql/test/table_disallow_partition.yaml b/backend/plugin/advisor/mysql/test/table_disallow_partition.yamlindex 18e65485f8..d1e6156169 100644--- a/backend/plugin/advisor/mysql/test/table_disallow_partition.yaml+++ b/backend/plugin/advisor/mysql/test/table_disallow_partition.yaml@@ -1,12 +1,12 @@- statement: CREATE TABLE t(a int);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE b(a INT);CREATE TABLE t(a int) PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (6),PARTITION p1 VALUES LESS THAN (11));- changeType: 0+ changeType: 1want:- status: 2code: 608@@ -25,7 +25,7 @@PARTITION p0 VALUES LESS THAN (6),PARTITION p1 VALUES LESS THAN (11));- changeType: 0+ changeType: 1want:- status: 2code: 608@@ -48,7 +48,7 @@PARTITION p0 VALUES LESS THAN (6),PARTITION p1 VALUES LESS THAN (11));- changeType: 0+ changeType: 1want:- status: 2code: 608diff --git a/backend/plugin/advisor/mysql/test/table_disallow_set_charset.yaml b/backend/plugin/advisor/mysql/test/table_disallow_set_charset.yamlindex eb8206be68..bb9e66c3c1 100644--- a/backend/plugin/advisor/mysql/test/table_disallow_set_charset.yaml+++ b/backend/plugin/advisor/mysql/test/table_disallow_set_charset.yaml@@ -3,7 +3,7 @@id INT PRIMARY KEY,name VARCHAR(50)) CHARSET=utf8;- changeType: 0+ changeType: 1want:- status: 2code: 612@@ -23,7 +23,7 @@name VARCHAR(50));ALTER TABLE employee CONVERT TO CHARACTER SET utf8;- changeType: 0+ changeType: 1want:- status: 2code: 612diff --git a/backend/plugin/advisor/mysql/test/table_disallow_trigger.yaml b/backend/plugin/advisor/mysql/test/table_disallow_trigger.yamlindex 553fecbd09..a1adce8173 100644--- a/backend/plugin/advisor/mysql/test/table_disallow_trigger.yaml+++ b/backend/plugin/advisor/mysql/test/table_disallow_trigger.yaml@@ -1,10 +1,10 @@- statement: CREATE TABLE t(a int);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE account (acct_num INT, amount DECIMAL(10,2));CREATE TRIGGER ins_sum BEFORE INSERT ON accountFOR EACH ROW SET @sum = @sum + NEW.amount;- changeType: 0+ changeType: 1want:- status: 2code: 610diff --git a/backend/plugin/advisor/mysql/test/table_drop_naming_convention.yaml b/backend/plugin/advisor/mysql/test/table_drop_naming_convention.yamlindex f356a448a8..0a8e808562 100644--- a/backend/plugin/advisor/mysql/test/table_drop_naming_convention.yaml+++ b/backend/plugin/advisor/mysql/test/table_drop_naming_convention.yaml@@ -2,11 +2,11 @@CREATE TABLE foo(a INT);RENAME TABLE foo to foo_delete;DROP TABLE IF EXISTS foo_delete;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE foo(a INT);DROP TABLE IF EXISTS foo;- changeType: 0+ changeType: 1want:- status: 2code: 603@@ -21,7 +21,7 @@RENAME TABLE foo to foo_delete;CREATE TABLE bar(a INT);DROP TABLE IF EXISTS foo_delete, bar;- changeType: 0+ changeType: 1want:- status: 2code: 603diff --git a/backend/plugin/advisor/mysql/test/table_no_duplicate_index.yaml b/backend/plugin/advisor/mysql/test/table_no_duplicate_index.yamlindex 59cd7d7f7a..513a6657e7 100644--- a/backend/plugin/advisor/mysql/test/table_no_duplicate_index.yaml+++ b/backend/plugin/advisor/mysql/test/table_no_duplicate_index.yaml@@ -7,7 +7,7 @@INDEX idx_email (email),INDEX idx_name (last_name, first_name));- changeType: 0+ changeType: 1- statement: |-CREATE TABLE orders (id INT PRIMARY KEY,@@ -17,7 +17,7 @@INDEX (order_number),UNIQUE (customer_id));- changeType: 0+ changeType: 1- statement: |-CREATE TABLE users (id INT PRIMARY KEY,@@ -27,7 +27,7 @@INDEX idx_email (email),INDEX idx_username_duplicate (username));- changeType: 0+ changeType: 1want:- status: 2code: 815@@ -46,7 +46,7 @@INDEX (order_number),INDEX (customer_id));- changeType: 0+ changeType: 1want:- status: 2code: 815@@ -66,7 +66,7 @@FOREIGN KEY (customer_id) REFERENCES customers(id));ALTER TABLE orders ADD INDEX idx_duplicate (customer_id);- changeType: 0+ changeType: 1want:- status: 2code: 815@@ -84,7 +84,7 @@);CREATE INDEX idx_customer_id ON orders (customer_id);CREATE INDEX idx_customer_id_duplicate ON orders (customer_id);- changeType: 0+ changeType: 1want:- status: 2code: 815@@ -102,7 +102,7 @@);CREATE INDEX idx_customer ON orders (customer, (order_number * 2));CREATE INDEX idx_customer_duplicate ON orders (customer, (order_number * 2));- changeType: 0+ changeType: 1want:- status: 2code: 815@@ -120,7 +120,7 @@);CREATE INDEX idx_customer_btree USING BTREE ON orders (customer);CREATE INDEX idx_customer_hash USING HASH ON orders (customer);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE orders_sh (id INT PRIMARY KEY,@@ -134,4 +134,4 @@customer VARCHAR(50));CREATE INDEX idx_customer_bj ON orders_bj (customer);- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/mysql/test/table_no_foreign_key.yaml b/backend/plugin/advisor/mysql/test/table_no_foreign_key.yamlindex c75a8a6b91..e4a7883f64 100644--- a/backend/plugin/advisor/mysql/test/table_no_foreign_key.yaml+++ b/backend/plugin/advisor/mysql/test/table_no_foreign_key.yaml@@ -1,7 +1,7 @@- statement: |-CREATE TABLE book(id INT);ALTER TABLE tech_book ADD CONSTRAINT fk_tech_book_author_id_author_id FOREIGN KEY (author_id) REFERENCES author (id);- changeType: 0+ changeType: 1want:- status: 2code: 602@@ -14,7 +14,7 @@- statement: |-CREATE TABLE t1 (id INT);CREATE TABLE book(id INT, author_id INT, FOREIGN KEY fk_book_author_id_author_id (author_id) REFERENCES author (id));- changeType: 0+ changeType: 1want:- status: 2code: 602diff --git a/backend/plugin/advisor/mysql/test/table_require_pk.yaml b/backend/plugin/advisor/mysql/test/table_require_pk.yamlindex 3901475871..f3c22eb98d 100644--- a/backend/plugin/advisor/mysql/test/table_require_pk.yaml+++ b/backend/plugin/advisor/mysql/test/table_require_pk.yaml@@ -11,7 +11,7 @@UNIQUE KEY uk1(id, name),FOREIGN KEY fk1(roomId) REFERENCES room(id),INDEX idx_userTable_content(content)) ENGINE = CSV COLLATE latin1_bin;- changeType: 0+ changeType: 1want:- status: 2code: 601@@ -33,12 +33,12 @@INDEX idx_user_name(name),UNIQUE KEY uk_user_id_name(id, name)) ENGINE = INNODB COMMENT 'comment';- changeType: 0+ changeType: 1- statement: |CREATE TABLE t1(id INT PRIMARY KEY);CREATE TABLE t2(id INT);ALTER TABLE t2 ADD UNIQUE INDEX uk (id);- changeType: 0+ changeType: 1want:- status: 2code: 601@@ -52,7 +52,7 @@CREATE TABLE t1(id INT, PRIMARY KEY (id));CREATE TABLE t2(id INT);ALTER TABLE t2 ADD COLUMN uid INT UNIQUE KEY;- changeType: 0+ changeType: 1want:- status: 2code: 601@@ -65,12 +65,12 @@- statement: |-CREATE TABLE t1(id INT PRIMARY KEY);CREATE TABLE t2(id INT, PRIMARY KEY (id));- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t1(id INT PRIMARY KEY);CREATE TABLE t2(id INT);DROP TABLE t1;- changeType: 0+ changeType: 1want:- status: 2code: 601@@ -85,15 +85,15 @@CREATE TABLE t2(id INT);DROP TABLE t1;DROP TABLE t2;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id INT);ALTER TABLE t ADD CONSTRAINT PRIMARY KEY (id);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id INT PRIMARY KEY);ALTER TABLE t DROP PRIMARY KEY;- changeType: 0+ changeType: 1want:- status: 2code: 601@@ -106,7 +106,7 @@- statement: |-CREATE TABLE t(id INT PRIMARY KEY);ALTER TABLE t DROP INDEX `PRIMARY`;- changeType: 0+ changeType: 1want:- status: 2code: 601@@ -119,28 +119,28 @@- statement: |-CREATE TABLE t(id INT);ALTER TABLE t ADD COLUMN name varchar(30) PRIMARY KEY;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id INT);ALTER TABLE t CHANGE COLUMN id id INT PRIMARY KEY;- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book CHANGE COLUMN id uid INT;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id INT);ALTER TABLE t MODIFY COLUMN id INT PRIMARY KEY;- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book MODIFY COLUMN id INT;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id INT, name varchar(30), PRIMARY KEY(id, name));ALTER TABLE t DROP COLUMN id;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id INT, name varchar(30), comment varchar(255), PRIMARY KEY(id, name));ALTER TABLE t ADD COLUMN age INT;ALTER TABLE t DROP COLUMN id, DROP COLUMN name;- changeType: 0+ changeType: 1want:- status: 2code: 601@@ -153,7 +153,7 @@- statement: |-ALTER TABLE tech_book ADD COLUMN c INT;ALTER TABLE tech_book ADD COLUMN a int, DROP COLUMN id, DROP COLUMN name;- changeType: 0+ changeType: 1want:- status: 2code: 601@@ -164,11 +164,11 @@column: 0endposition: null- statement: ALTER TABLE tech_book DROP COLUMN name;- changeType: 0+ changeType: 1- statement: |-ALTER TABLE tech_book ADD COLUMN c INT;ALTER TABLE tech_book DROP COLUMN name, DROP COLUMN id;- changeType: 0+ changeType: 1want:- status: 2code: 601@@ -181,7 +181,7 @@- statement: |-ALTER TABLE tech_book CHANGE COLUMN id uid int;ALTER TABLE tech_book ADD COLUMN a int, DROP COLUMN uid, DROP COLUMN name;- changeType: 0+ changeType: 1want:- status: 2code: 601diff --git a/backend/plugin/advisor/oracle/test/column_add_not_null_require_default.yaml b/backend/plugin/advisor/oracle/test/column_add_not_null_require_default.yamlindex 76351123c9..cdb39478e8 100644--- a/backend/plugin/advisor/oracle/test/column_add_not_null_require_default.yaml+++ b/backend/plugin/advisor/oracle/test/column_add_not_null_require_default.yaml@@ -1,5 +1,5 @@- statement: ALTER TABLE tech_book ADD reader int NOT NULL- changeType: 0+ changeType: 1want:- status: 2code: 404@@ -10,4 +10,4 @@column: 0endposition: null- statement: ALTER TABLE tech_book ADD reader int DEFAULT 0 NOT NULL- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/oracle/test/column_comment.yaml b/backend/plugin/advisor/oracle/test/column_comment.yamlindex a4372930fd..379a7eab1b 100644--- a/backend/plugin/advisor/oracle/test/column_comment.yaml+++ b/backend/plugin/advisor/oracle/test/column_comment.yaml@@ -3,14 +3,14 @@id int);COMMENT ON COLUMN book.id IS 'comments';- changeType: 0+ changeType: 1- statement: |-ALTER TABLE t ADD (d int, a int);COMMENT ON COLUMN t.d IS 'comments';COMMENT ON COLUMN t.a IS 'comments';- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a int);- changeType: 0+ changeType: 1want:- status: 2code: 1032@@ -23,7 +23,7 @@- statement: |-ALTER TABLE t ADD (d int, a int);COMMENT ON COLUMN t.a IS 'comments';- changeType: 0+ changeType: 1want:- status: 2code: 1032@@ -37,7 +37,7 @@CREATE TABLE t(a int);COMMENT ON COLUMN t.a IS 'comments';COMMENT ON COLUMN t.a IS '';- changeType: 0+ changeType: 1want:- status: 2code: 1032diff --git a/backend/plugin/advisor/oracle/test/column_maximum_character_length.yaml b/backend/plugin/advisor/oracle/test/column_maximum_character_length.yamlindex 071169f7b0..809e108f09 100644--- a/backend/plugin/advisor/oracle/test/column_maximum_character_length.yaml+++ b/backend/plugin/advisor/oracle/test/column_maximum_character_length.yaml@@ -1,9 +1,9 @@- statement: CREATE TABLE t(name char(20));- changeType: 0+ changeType: 1- statement: CREATE TABLE t(name varchar(225));- changeType: 0+ changeType: 1- statement: CREATE TABLE t(name char(225));- changeType: 0+ changeType: 1want:- status: 2code: 415@@ -14,7 +14,7 @@column: 0endposition: null- statement: ALTER TABLE public.tech_book ADD name_2 char(225)- changeType: 0+ changeType: 1want:- status: 2code: 415@@ -25,7 +25,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book MODIFY name char(225)- changeType: 0+ changeType: 1want:- status: 2code: 415diff --git a/backend/plugin/advisor/oracle/test/column_maximum_varchar_length.yaml b/backend/plugin/advisor/oracle/test/column_maximum_varchar_length.yamlindex b94eabcb65..193eecb516 100644--- a/backend/plugin/advisor/oracle/test/column_maximum_varchar_length.yaml+++ b/backend/plugin/advisor/oracle/test/column_maximum_varchar_length.yaml@@ -1,7 +1,7 @@- statement: CREATE TABLE t(name varchar(20));- changeType: 0+ changeType: 1- statement: CREATE TABLE t(name varchar(3000));- changeType: 0+ changeType: 1want:- status: 2code: 422@@ -12,9 +12,9 @@column: 0endposition: null- statement: CREATE TABLE t(name varchar(225));- changeType: 0+ changeType: 1- statement: ALTER TABLE public.tech_book ADD name_2 varchar(22225)- changeType: 0+ changeType: 1want:- status: 2code: 422@@ -25,7 +25,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book MODIFY name varchar(22225)- changeType: 0+ changeType: 1want:- status: 2code: 422diff --git a/backend/plugin/advisor/oracle/test/column_no_null.yaml b/backend/plugin/advisor/oracle/test/column_no_null.yamlindex 2110713b33..6f44ae04aa 100644--- a/backend/plugin/advisor/oracle/test/column_no_null.yaml+++ b/backend/plugin/advisor/oracle/test/column_no_null.yaml@@ -3,7 +3,7 @@id int,name varchar(255))- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -22,7 +22,7 @@column: 0endposition: null- statement: CREATE TABLE book(id int, name varchar(255), PRIMARY KEY (id))- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -33,7 +33,7 @@column: 0endposition: null- statement: CREATE TABLE book(id int PRIMARY KEY, name varchar(255))- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -44,7 +44,7 @@column: 0endposition: null- statement: CREATE TABLE book(id int NOT NULL, name varchar(255))- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -55,9 +55,9 @@column: 0endposition: null- statement: CREATE TABLE book(id int PRIMARY KEY, name varchar(255) NOT NULL)- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book ADD reader int- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -72,11 +72,11 @@ALTER TABLE tech_book DROP COLUMN name;ALTER TABLE tech_book ADD id int PRIMARY KEY;ALTER TABLE tech_book ADD name varchar(255) NOT NULL;- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book MODIFY id NOT NULL- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book MODIFY name NULL- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -87,4 +87,4 @@column: 0endposition: null- statement: -- this is a comment- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/oracle/test/column_require_default.yaml b/backend/plugin/advisor/oracle/test/column_require_default.yamlindex 80abfc4f92..18e1c8d992 100644--- a/backend/plugin/advisor/oracle/test/column_require_default.yaml+++ b/backend/plugin/advisor/oracle/test/column_require_default.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE t(a int primary key, b int default 1)- changeType: 0+ changeType: 1want:- status: 2code: 420@@ -14,7 +14,7 @@a int,b int default 1)- changeType: 0+ changeType: 1want:- status: 2code: 420diff --git a/backend/plugin/advisor/oracle/test/column_required.yaml b/backend/plugin/advisor/oracle/test/column_required.yamlindex a71c4d33b6..0129732ed0 100644--- a/backend/plugin/advisor/oracle/test/column_required.yaml+++ b/backend/plugin/advisor/oracle/test/column_required.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE book("id" int)- changeType: 0+ changeType: 1want:- status: 2code: 401@@ -16,11 +16,11 @@"created_ts" timestamp,"updater_id" int,"updated_ts" timestamp)- changeType: 0+ changeType: 1- statement: |-ALTER TABLE tech_book ADD "creator_id" int;ALTER TABLE tech_book RENAME COLUMN "creator_id" TO creator;- changeType: 0+ changeType: 1want:- status: 2code: 401@@ -33,7 +33,7 @@- statement: |-ALTER TABLE tech_book ADD "creator_id" int;ALTER TABLE tech_book DROP COLUMN "creator_id";- changeType: 0+ changeType: 1want:- status: 2code: 401diff --git a/backend/plugin/advisor/oracle/test/column_type_disallow_list.yaml b/backend/plugin/advisor/oracle/test/column_type_disallow_list.yamlindex 9066a62b6b..de2023d704 100644--- a/backend/plugin/advisor/oracle/test/column_type_disallow_list.yaml+++ b/backend/plugin/advisor/oracle/test/column_type_disallow_list.yaml@@ -1,7 +1,7 @@- statement: CREATE TABLE t(a char(5));- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a int, b JSON);- changeType: 0+ changeType: 1want:- status: 2code: 411@@ -14,7 +14,7 @@- statement: |-CREATE TABLE t(d char(5));ALTER TABLE t add a JSON;- changeType: 0+ changeType: 1want:- status: 2code: 411@@ -27,7 +27,7 @@- statement: |-CREATE TABLE t(d char(5));ALTER TABLE t MODIFY d BINARY_FLOAT;- changeType: 0+ changeType: 1want:- status: 2code: 411@@ -38,7 +38,7 @@column: 0endposition: null- statement: CREATE TABLE t(a int, b BINARY_FLOAT);- changeType: 0+ changeType: 1want:- status: 2code: 411@@ -51,7 +51,7 @@- statement: |-CREATE TABLE t(d char(5));ALTER TABLE t add a BINARY_FLOAT;- changeType: 0+ changeType: 1want:- status: 2code: 411diff --git a/backend/plugin/advisor/oracle/test/index_key_number_limit.yaml b/backend/plugin/advisor/oracle/test/index_key_number_limit.yamlindex c9051e5159..e1a0e1e6ea 100644--- a/backend/plugin/advisor/oracle/test/index_key_number_limit.yaml+++ b/backend/plugin/advisor/oracle/test/index_key_number_limit.yaml@@ -1,11 +1,11 @@- statement: CREATE TABLE t(name char(20));- changeType: 0+ changeType: 1- statement: CREATE TABLE t(name varchar(225));- changeType: 0+ changeType: 1- statement: CREATE TABLE t(name char(225), PRIMARY KEY (name));- changeType: 0+ changeType: 1- statement: CREATE TABLE t(id int, name char(225), c1 int, c2 int, c3 int, c4 int, CONSTRAINT t_id_name PRIMARY KEY (id, name, c1, c2, c3, c4));- changeType: 0+ changeType: 1want:- status: 2code: 802@@ -16,7 +16,7 @@column: 0endposition: null- statement: CREATE TABLE t(id int, name char(225), c1 int, c2 int, c3 int, c4 int, CONSTRAINT t_id_name UNIQUE (id, name, c1, c2, c3, c4));- changeType: 0+ changeType: 1want:- status: 2code: 802@@ -29,7 +29,7 @@- statement: |-CREATE TABLE address(id int, phone varchar(225), c1 int, c2 int, c3 int, c4 int);CREATE INDEX idx_address_phone ON address(id, phone, c1, c2, c3, c4);- changeType: 0+ changeType: 1want:- status: 2code: 802@@ -42,7 +42,7 @@- statement: |-CREATE TABLE address(id int, phone varchar(225), c1 int, c2 int, c3 int, c4 int);CREATE UNIQUE INDEX idx_address_phone ON address(id, phone, c2, c1, c3, c4);- changeType: 0+ changeType: 1want:- status: 2code: 802@@ -55,7 +55,7 @@- statement: |-CREATE TABLE address(id int, phone varchar(225), c1 int, c2 int, c3 int, c4 int);ALTER TABLE address ADD CONSTRAINT address_id_name UNIQUE (id, phone, c1, c2, c3, c4);- changeType: 0+ changeType: 1want:- status: 2code: 802diff --git a/backend/plugin/advisor/oracle/test/naming_identifier_case.yaml b/backend/plugin/advisor/oracle/test/naming_identifier_case.yamlindex 487b0dd656..d2617a14fb 100644--- a/backend/plugin/advisor/oracle/test/naming_identifier_case.yaml+++ b/backend/plugin/advisor/oracle/test/naming_identifier_case.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE "table"(id int, name varchar(255))- changeType: 0+ changeType: 1want:- status: 2code: 309@@ -10,9 +10,9 @@column: 0endposition: null- statement: CREATE TABLE tt(id int, name varchar(255))- changeType: 0+ changeType: 1- statement: CREATE TABLE "Tt"(id int, name varchar(255))- changeType: 0+ changeType: 1want:- status: 2code: 309@@ -23,8 +23,8 @@column: 0endposition: null- statement: ALTER TABLE tech_book RENAME TO analyze- changeType: 0+ changeType: 1- statement: |-create table techBook(id int);ALTER TABLE techBook RENAME TO tech_book_tmp;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/oracle/test/naming_identifier_no_keyword.yaml b/backend/plugin/advisor/oracle/test/naming_identifier_no_keyword.yamlindex 0881fd76a8..001f6b3276 100644--- a/backend/plugin/advisor/oracle/test/naming_identifier_no_keyword.yaml+++ b/backend/plugin/advisor/oracle/test/naming_identifier_no_keyword.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE "table"(id int, name varchar(255))- changeType: 0+ changeType: 1want:- status: 2code: 308@@ -18,7 +18,7 @@column: 0endposition: null- statement: CREATE TABLE "rlcmidzlevbivwvcntihenpoibtsdfasdfasdfiutqeb"(id int, name varchar(255))- changeType: 0+ changeType: 1want:- status: 2code: 308@@ -29,7 +29,7 @@column: 0endposition: null- statement: CREATE TABLE analyze(id int, name varchar(255))- changeType: 0+ changeType: 1want:- status: 2code: 308@@ -40,8 +40,8 @@column: 0endposition: null- statement: ALTER TABLE tech_book RENAME TO analyze- changeType: 0+ changeType: 1- statement: |-create table techBook(id int);ALTER TABLE techBook RENAME TO tech_book_tmp;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/oracle/test/naming_table.yaml b/backend/plugin/advisor/oracle/test/naming_table.yamlindex bb9349c546..221b6123a3 100644--- a/backend/plugin/advisor/oracle/test/naming_table.yaml+++ b/backend/plugin/advisor/oracle/test/naming_table.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE "techBook"(id int, name varchar(255))- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -10,9 +10,9 @@column: 0endposition: null- statement: CREATE TABLE "rlcmidzlevbivwvcntihenpoibtsdfasdfasdfiutqeb"(id int, name varchar(255))- changeType: 0+ changeType: 1- statement: CREATE TABLE tech_Book(id int, name varchar(255))- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -23,7 +23,7 @@column: 0endposition: null- statement: CREATE TABLE techBook(id int, name varchar(255))- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -34,7 +34,7 @@column: 0endposition: null- statement: CREATE TABLE book(id int, name varchar(255))- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -45,7 +45,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book RENAME TO "TechBook"- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -58,7 +58,7 @@- statement: |-create table techBook(id int);ALTER TABLE techBook RENAME TO tech_book_tmp;- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -79,7 +79,7 @@- statement: |-CREATE TABLE tech_Book(id int, name varchar(255));ALTER TABLE tech_book RENAME TO "tech_book";- changeType: 0+ changeType: 1want:- status: 2code: 301diff --git a/backend/plugin/advisor/oracle/test/naming_table_no_keyword.yaml b/backend/plugin/advisor/oracle/test/naming_table_no_keyword.yamlindex 76f483bb48..6e4d9eb069 100644--- a/backend/plugin/advisor/oracle/test/naming_table_no_keyword.yaml+++ b/backend/plugin/advisor/oracle/test/naming_table_no_keyword.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE "table"(id int, name varchar(255))- changeType: 0+ changeType: 1want:- status: 2code: 308@@ -10,9 +10,9 @@column: 0endposition: null- statement: CREATE TABLE "rlcmidzlevbivwvcntihenpoibtsdfasdfasdfiutqeb"(id int, name varchar(255))- changeType: 0+ changeType: 1- statement: CREATE TABLE avg(id int, name varchar(255))- changeType: 0+ changeType: 1want:- status: 2code: 308@@ -23,7 +23,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book RENAME TO avg- changeType: 0+ changeType: 1want:- status: 2code: 308@@ -36,4 +36,4 @@- statement: |-create table techBook(id int);ALTER TABLE techBook RENAME TO tech_book_tmp;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/oracle/test/statement_insert_must_specify_column.yaml b/backend/plugin/advisor/oracle/test/statement_insert_must_specify_column.yamlindex 4bc3f0e81e..bf0c6f427b 100644--- a/backend/plugin/advisor/oracle/test/statement_insert_must_specify_column.yaml+++ b/backend/plugin/advisor/oracle/test/statement_insert_must_specify_column.yaml@@ -1,7 +1,7 @@- statement: INSERT INTO tech_book(id, name) VALUES (1, '1')- changeType: 0+ changeType: 1- statement: INSERT INTO tech_book VALUES (1, '1')- changeType: 0+ changeType: 1want:- status: 2code: 1107diff --git a/backend/plugin/advisor/oracle/test/statement_select_no_select_all.yaml b/backend/plugin/advisor/oracle/test/statement_select_no_select_all.yamlindex 2ff05e6e09..82b924dd68 100644--- a/backend/plugin/advisor/oracle/test/statement_select_no_select_all.yaml+++ b/backend/plugin/advisor/oracle/test/statement_select_no_select_all.yaml@@ -1,5 +1,5 @@- statement: SELECT * FROM t- changeType: 0+ changeType: 1want:- status: 2code: 203@@ -10,9 +10,9 @@column: 0endposition: null- statement: SELECT a, b FROM t- changeType: 0+ changeType: 1- statement: SELECT a, b FROM (SELECT * from t1, t2) t- changeType: 0+ changeType: 1want:- status: 2code: 203@@ -23,7 +23,7 @@column: 0endposition: null- statement: INSERT INTO t SELECT * FROM t1- changeType: 0+ changeType: 1want:- status: 2code: 203diff --git a/backend/plugin/advisor/oracle/test/statement_where_no_leading_wildcard_like.yaml b/backend/plugin/advisor/oracle/test/statement_where_no_leading_wildcard_like.yamlindex 2da180aa84..cfc3120b7b 100644--- a/backend/plugin/advisor/oracle/test/statement_where_no_leading_wildcard_like.yaml+++ b/backend/plugin/advisor/oracle/test/statement_where_no_leading_wildcard_like.yaml@@ -1,7 +1,7 @@- statement: SELECT * FROM t WHERE a LIKE 'abc%'- changeType: 0+ changeType: 1- statement: SELECT * FROM t WHERE a LIKE '%abc'- changeType: 0+ changeType: 1want:- status: 2code: 204@@ -12,7 +12,7 @@column: 0endposition: null- statement: SELECT * FROM t WHERE a LIKE 'abc' OR a LIKE '%abc'- changeType: 0+ changeType: 1want:- status: 2code: 204@@ -23,7 +23,7 @@column: 0endposition: null- statement: SELECT * FROM t WHERE a LIKE '%acc' OR a LIKE '%abc'- changeType: 0+ changeType: 1want:- status: 2code: 204@@ -42,7 +42,7 @@column: 0endposition: null- statement: SELECT * FROM (SELECT * FROM t WHERE a LIKE '%acc' OR a LIKE '%abc') t1- changeType: 0+ changeType: 1want:- status: 2code: 204diff --git a/backend/plugin/advisor/oracle/test/statement_where_require_select.yaml b/backend/plugin/advisor/oracle/test/statement_where_require_select.yamlindex 48afbe8b06..55fcb5cbdc 100644--- a/backend/plugin/advisor/oracle/test/statement_where_require_select.yaml+++ b/backend/plugin/advisor/oracle/test/statement_where_require_select.yaml@@ -1,5 +1,5 @@- statement: SELECT a FROM t- changeType: 0+ changeType: 1want:- status: 2code: 202@@ -10,9 +10,9 @@column: 0endposition: null- statement: SELECT a FROM t WHERE a > 0- changeType: 0+ changeType: 1- statement: SELECT a FROM t WHERE a > (SELECT max(id) FROM user)- changeType: 0+ changeType: 1want:- status: 2code: 202@@ -23,4 +23,4 @@column: 0endposition: null- statement: SELECT 1 FROM dual- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/oracle/test/statement_where_require_update_delete.yaml b/backend/plugin/advisor/oracle/test/statement_where_require_update_delete.yamlindex e7b492f675..680c13a6e3 100644--- a/backend/plugin/advisor/oracle/test/statement_where_require_update_delete.yaml+++ b/backend/plugin/advisor/oracle/test/statement_where_require_update_delete.yaml@@ -1,5 +1,5 @@- statement: DELETE FROM t1- changeType: 0+ changeType: 1want:- status: 2code: 202@@ -10,7 +10,7 @@column: 0endposition: null- statement: UPDATE t1 SET a = 1- changeType: 0+ changeType: 1want:- status: 2code: 202@@ -21,6 +21,6 @@column: 0endposition: null- statement: DELETE FROM t1 WHERE a > 0- changeType: 0+ changeType: 1- statement: UPDATE t1 SET a = 1 WHERE a > 10- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/oracle/test/table_comment.yaml b/backend/plugin/advisor/oracle/test/table_comment.yamlindex 7922d7da7d..7077cff7ff 100644--- a/backend/plugin/advisor/oracle/test/table_comment.yaml+++ b/backend/plugin/advisor/oracle/test/table_comment.yaml@@ -4,9 +4,9 @@name varchar(255));COMMENT ON TABLE book IS 'comments';- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a int);- changeType: 0+ changeType: 1want:- status: 2code: 1032@@ -20,7 +20,7 @@CREATE TABLE t(a int);CREATE TABLE d(a int);COMMENT ON TABLE t IS 'comments';- changeType: 0+ changeType: 1want:- status: 2code: 1032@@ -34,7 +34,7 @@CREATE TABLE t(a int);COMMENT ON TABLE t IS 'comments';COMMENT ON TABLE t IS '';- changeType: 0+ changeType: 1want:- status: 2code: 1032@@ -47,7 +47,7 @@- statement: |-CREATE TABLE t(a int);COMMENT ON TABLE t IS 'looooooong comments';- changeType: 0+ changeType: 1want:- status: 2code: 1301diff --git a/backend/plugin/advisor/oracle/test/table_no_foreign_key.yaml b/backend/plugin/advisor/oracle/test/table_no_foreign_key.yamlindex e118a70ccc..17ae5effa4 100644--- a/backend/plugin/advisor/oracle/test/table_no_foreign_key.yaml+++ b/backend/plugin/advisor/oracle/test/table_no_foreign_key.yaml@@ -1,5 +1,5 @@- statement: ALTER TABLE tech_book ADD CONSTRAINT fk_tech_book_author_id_author_id FOREIGN KEY (author_id) REFERENCES author (id)- changeType: 0+ changeType: 1want:- status: 2code: 602@@ -10,7 +10,7 @@column: 0endposition: null- statement: CREATE TABLE book(id INT, author_id INT, CONSTRAINT fk_book_author_id_author_id FOREIGN KEY (author_id) REFERENCES author (id))- changeType: 0+ changeType: 1want:- status: 2code: 602diff --git a/backend/plugin/advisor/oracle/test/table_require_pk.yaml b/backend/plugin/advisor/oracle/test/table_require_pk.yamlindex e9438c5ad5..83dd8ea72b 100644--- a/backend/plugin/advisor/oracle/test/table_require_pk.yaml+++ b/backend/plugin/advisor/oracle/test/table_require_pk.yaml@@ -1,9 +1,9 @@- statement: CREATE TABLE abc.t(id INT PRIMARY KEY);- changeType: 0+ changeType: 1- statement: CREATE TABLE t(id INT, PRIMARY KEY (id))- changeType: 0+ changeType: 1- statement: CREATE TABLE "TEST_DB".t(id INT)- changeType: 0+ changeType: 1want:- status: 2code: 601@@ -16,15 +16,15 @@- statement: |-CREATE TABLE t(id INT);DROP TABLE t- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id INT);ALTER TABLE t ADD CONSTRAINT tpk PRIMARY KEY (id)- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id INT PRIMARY KEY);ALTER TABLE t DROP PRIMARY KEY- changeType: 0+ changeType: 1want:- status: 2code: 601diff --git a/backend/plugin/advisor/pg/test/column_comment.yaml b/backend/plugin/advisor/pg/test/column_comment.yamlindex a645b529ca..9f393e4995 100644--- a/backend/plugin/advisor/pg/test/column_comment.yaml+++ b/backend/plugin/advisor/pg/test/column_comment.yaml@@ -1,9 +1,9 @@- statement: |-CREATE TABLE t(a int);COMMENT ON COLUMN t.a IS 'comments';- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a int);- changeType: 0+ changeType: 1want:- status: 2code: 1032@@ -16,7 +16,7 @@- statement: |-CREATE TABLE t(a int);COMMENT ON COLUMN t.a IS 'loooooooong comments';- changeType: 0+ changeType: 1want:- status: 2code: 1301@@ -29,7 +29,7 @@- statement: |-CREATE TABLE t(a int, d text);COMMENT ON COLUMN t.a IS 'comments';- changeType: 0+ changeType: 1want:- status: 2code: 1032@@ -43,7 +43,7 @@CREATE TABLE t(a int);COMMENT ON COLUMN t.a IS 'loooooooong comments';COMMENT ON COLUMN t.a IS NULL;- changeType: 0+ changeType: 1want:- status: 2code: 1032diff --git a/backend/plugin/advisor/pg/test/column_default_disallow_volatile.yaml b/backend/plugin/advisor/pg/test/column_default_disallow_volatile.yamlindex 28a7ad773f..745fcee28c 100644--- a/backend/plugin/advisor/pg/test/column_default_disallow_volatile.yaml+++ b/backend/plugin/advisor/pg/test/column_default_disallow_volatile.yaml@@ -1,7 +1,7 @@- statement: CREATE TABLE t(a serial primary key, b int default 1, c boolean default true, d int default current_user)- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book ADD COLUMN b timestamp default now();- changeType: 0+ changeType: 1want:- status: 2code: 420diff --git a/backend/plugin/advisor/pg/test/column_disallow_change_type.yaml b/backend/plugin/advisor/pg/test/column_disallow_change_type.yamlindex 3e3514b055..1e25918385 100644--- a/backend/plugin/advisor/pg/test/column_disallow_change_type.yaml+++ b/backend/plugin/advisor/pg/test/column_disallow_change_type.yaml@@ -1,5 +1,5 @@- statement: ALTER TABLE tech_book ALTER COLUMN id SET DATA TYPE INTEGER- changeType: 0+ changeType: 1want:- status: 2code: 403@@ -10,4 +10,4 @@column: 0endposition: null- statement: ALTER TABLE tech_book ADD COLUMN c1 int- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/pg/test/column_maximum_character_length.yaml b/backend/plugin/advisor/pg/test/column_maximum_character_length.yamlindex ef452c0366..965ef715e1 100644--- a/backend/plugin/advisor/pg/test/column_maximum_character_length.yaml+++ b/backend/plugin/advisor/pg/test/column_maximum_character_length.yaml@@ -1,9 +1,9 @@- statement: CREATE TABLE t(name char(20));- changeType: 0+ changeType: 1- statement: CREATE TABLE t(name varchar(225));- changeType: 0+ changeType: 1- statement: CREATE TABLE t(name char(225));- changeType: 0+ changeType: 1want:- status: 2code: 415@@ -14,7 +14,7 @@column: 0endposition: null- statement: ALTER TABLE public.tech_book ADD COLUMN name_2 char(225)- changeType: 0+ changeType: 1want:- status: 2code: 415@@ -25,7 +25,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book ALTER COLUMN name SET DATA TYPE char(225)- changeType: 0+ changeType: 1want:- status: 2code: 415diff --git a/backend/plugin/advisor/pg/test/column_no_null.yaml b/backend/plugin/advisor/pg/test/column_no_null.yamlindex 9ed943f06e..878ebc33dc 100644--- a/backend/plugin/advisor/pg/test/column_no_null.yaml+++ b/backend/plugin/advisor/pg/test/column_no_null.yaml@@ -3,7 +3,7 @@id int,name varchar(255))- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -22,7 +22,7 @@column: 0endposition: null- statement: CREATE TABLE book(id int, name varchar(255), PRIMARY KEY (id))- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -33,7 +33,7 @@column: 0endposition: null- statement: CREATE TABLE book(id int PRIMARY KEY, name varchar(255))- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -44,7 +44,7 @@column: 0endposition: null- statement: CREATE TABLE book(id int NOT NULL, name varchar(255))- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -55,9 +55,9 @@column: 0endposition: null- statement: CREATE TABLE book(id int PRIMARY KEY, name varchar(255) NOT NULL)- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book ADD COLUMN reader int- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -71,11 +71,11 @@ALTER TABLE tech_book DROP COLUMN id;ALTER TABLE tech_book DROP COLUMN name;ALTER TABLE tech_book ADD COLUMN id int PRIMARY KEY, ADD COLUMN name varchar(255) NOT NULL;- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book ALTER COLUMN id SET NOT NULL- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book ALTER COLUMN name DROP NOT NULL- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -86,4 +86,4 @@column: 0endposition: null- statement: /* this is a comment */- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/pg/test/column_require_default.yaml b/backend/plugin/advisor/pg/test/column_require_default.yamlindex 48e68b13c0..2aed84eef3 100644--- a/backend/plugin/advisor/pg/test/column_require_default.yaml+++ b/backend/plugin/advisor/pg/test/column_require_default.yaml@@ -4,7 +4,7 @@b text,primary key (a));- changeType: 0+ changeType: 1want:- status: 2code: 420@@ -23,13 +23,13 @@column: 0endposition: null- statement: CREATE TABLE t(a serial primary key, b int default 1)- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int,b int default 1)- changeType: 0+ changeType: 1want:- status: 2code: 420@@ -42,7 +42,7 @@- statement: |-ALTER TABLE tech_book ADD COLUMN a BLOB;ALTER TABLE tech_book ADD COLUMN b timestamp;- changeType: 0+ changeType: 1want:- status: 2code: 420diff --git a/backend/plugin/advisor/pg/test/column_required.yaml b/backend/plugin/advisor/pg/test/column_required.yamlindex 87f94492c1..b3eb2252d7 100644--- a/backend/plugin/advisor/pg/test/column_required.yaml+++ b/backend/plugin/advisor/pg/test/column_required.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE book(id int)- changeType: 0+ changeType: 1want:- status: 2code: 401@@ -16,11 +16,11 @@created_ts timestamp,updater_id int,updated_ts timestamp)- changeType: 0+ changeType: 1- statement: |-ALTER TABLE tech_book ADD COLUMN creator_id int;ALTER TABLE tech_book RENAME COLUMN creator_id TO creator;- changeType: 0+ changeType: 1want:- status: 2code: 401@@ -33,7 +33,7 @@- statement: |-ALTER TABLE tech_book ADD COLUMN creator_id int;ALTER TABLE tech_book DROP COLUMN creator_id;- changeType: 0+ changeType: 1want:- status: 2code: 401diff --git a/backend/plugin/advisor/pg/test/column_type_disallow_list.yaml b/backend/plugin/advisor/pg/test/column_type_disallow_list.yamlindex 76de5f7519..974bf2fb39 100644--- a/backend/plugin/advisor/pg/test/column_type_disallow_list.yaml+++ b/backend/plugin/advisor/pg/test/column_type_disallow_list.yaml@@ -1,7 +1,7 @@- statement: CREATE TABLE t(a char(5));- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a int, b JSON);- changeType: 0+ changeType: 1want:- status: 2code: 411@@ -14,7 +14,7 @@- statement: |-CREATE TABLE t(d char(5));ALTER TABLE t add COLUMN a JSON;- changeType: 0+ changeType: 1want:- status: 2code: 411diff --git a/backend/plugin/advisor/pg/test/index_create_concurrently.yaml b/backend/plugin/advisor/pg/test/index_create_concurrently.yamlindex df3af9285d..64b9b99cf3 100644--- a/backend/plugin/advisor/pg/test/index_create_concurrently.yaml+++ b/backend/plugin/advisor/pg/test/index_create_concurrently.yaml@@ -1,5 +1,5 @@- statement: create index on tech_book(id);- changeType: 0+ changeType: 1want:- status: 2code: 814@@ -10,4 +10,4 @@column: 0endposition: null- statement: create index concurrently on tech_book(id);- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/pg/test/index_key_number_limit.yaml b/backend/plugin/advisor/pg/test/index_key_number_limit.yamlindex b6e2141cda..467b8edfc3 100644--- a/backend/plugin/advisor/pg/test/index_key_number_limit.yaml+++ b/backend/plugin/advisor/pg/test/index_key_number_limit.yaml@@ -1,11 +1,11 @@- statement: CREATE TABLE t(name char(20));- changeType: 0+ changeType: 1- statement: CREATE TABLE t(name varchar(225));- changeType: 0+ changeType: 1- statement: CREATE TABLE t(name char(225), PRIMARY KEY (name));- changeType: 0+ changeType: 1- statement: CREATE TABLE t(id int, name char(225), c1 int, c2 int, c3 int, c4 int, CONSTRAINT t_id_name PRIMARY KEY (id, name, c1, c2, c3, c4));- changeType: 0+ changeType: 1want:- status: 2code: 802@@ -16,7 +16,7 @@column: 0endposition: null- statement: CREATE TABLE t(id int, name char(225), c1 int, c2 int, c3 int, c4 int, CONSTRAINT t_id_name UNIQUE (id, name, c1, c2, c3, c4));- changeType: 0+ changeType: 1want:- status: 2code: 802@@ -29,7 +29,7 @@- statement: |-CREATE TABLE address(id int, phone varchar(225), c1 int, c2 int, c3 int, c4 int);CREATE INDEX idx_address_phone ON address(id, phone, c1, c2, c3, c4);- changeType: 0+ changeType: 1want:- status: 2code: 802@@ -42,7 +42,7 @@- statement: |-CREATE TABLE address(id int, phone varchar(225), c1 int, c2 int, c3 int, c4 int);CREATE UNIQUE INDEX idx_address_phone ON address(id, phone, c2, c1, c3, c4);- changeType: 0+ changeType: 1want:- status: 2code: 802@@ -55,7 +55,7 @@- statement: |-CREATE TABLE address(id int, phone varchar(225), c1 int, c2 int, c3 int, c4 int);ALTER TABLE address ADD CONSTRAINT address_id_name UNIQUE (id, phone, c1, c2, c3, c4);- changeType: 0+ changeType: 1want:- status: 2code: 802diff --git a/backend/plugin/advisor/pg/test/index_no_duplicate_column.yaml b/backend/plugin/advisor/pg/test/index_no_duplicate_column.yamlindex e8bf233f5d..120b66b6b5 100644--- a/backend/plugin/advisor/pg/test/index_no_duplicate_column.yaml+++ b/backend/plugin/advisor/pg/test/index_no_duplicate_column.yaml@@ -1,10 +1,10 @@- statement: CREATE TABLE t (a INT, PRIMARY KEY (a));- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t (a int,PRIMARY KEY (a, a));- changeType: 0+ changeType: 1want:- status: 2code: 812@@ -17,7 +17,7 @@- statement: |-CREATE TABLE t(a int);CREATE INDEX idx_a on t(a, a);- changeType: 0+ changeType: 1want:- status: 2code: 812@@ -30,7 +30,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD CONSTRAINT uk_a UNIQUE (a, a);- changeType: 0+ changeType: 1want:- status: 2code: 812@@ -43,7 +43,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD CONSTRAINT pk_a PRIMARY KEY (a, a);- changeType: 0+ changeType: 1want:- status: 2code: 812@@ -56,7 +56,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD CONSTRAINT fk_a FOREIGN KEY (a, a) REFERENCES t1(a, b);- changeType: 0+ changeType: 1want:- status: 2code: 812diff --git a/backend/plugin/advisor/pg/test/index_primary_key_type_allowlist.yaml b/backend/plugin/advisor/pg/test/index_primary_key_type_allowlist.yamlindex cb34ab41f0..7a6b2bad7e 100644--- a/backend/plugin/advisor/pg/test/index_primary_key_type_allowlist.yaml+++ b/backend/plugin/advisor/pg/test/index_primary_key_type_allowlist.yaml@@ -1,12 +1,12 @@- statement: CREATE TABLE t(a SERIAL PRIMARY KEY);- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a BIGSERIAL, PRIMARY KEY(a));- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a varchar(20) PRIMARY KEY);- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -21,7 +21,7 @@a varchar(20),PRIMARY KEY(a));- changeType: 0+ changeType: 1want:- status: 2code: 803diff --git a/backend/plugin/advisor/pg/test/index_total_number_limit.yaml b/backend/plugin/advisor/pg/test/index_total_number_limit.yamlindex cd3fa42ecf..b73987ed66 100644--- a/backend/plugin/advisor/pg/test/index_total_number_limit.yaml+++ b/backend/plugin/advisor/pg/test/index_total_number_limit.yaml@@ -1,14 +1,14 @@- statement: CREATE TABLE t(a int, b int, c int, unique (a, b, c))- changeType: 0+ changeType: 1- statement: CREATE INDEX idx_id_name on tech_book(id, name)- changeType: 0+ changeType: 1- statement: |-CREATE INDEX idx_id_name_1 on tech_book(id, name);CREATE INDEX idx_id_name_2 on tech_book(id, name);CREATE INDEX idx_id_name_3 on tech_book(id, name);CREATE INDEX idx_id_name_4 on tech_book(id, name);CREATE INDEX idx_id_name_5 on tech_book(id, name);- changeType: 0+ changeType: 1want:- status: 2code: 813@@ -25,7 +25,7 @@CREATE INDEX idx_a_b_3 on t(a, b);CREATE INDEX idx_a_b_4 on t(a, b);CREATE INDEX idx_a_b_5 on t(a, b);- changeType: 0+ changeType: 1want:- status: 2code: 813@@ -45,7 +45,7 @@CONSTRAINT idx_a_b_3 UNIQUE (a, b),CONSTRAINT idx_a_b_4 UNIQUE (a, b),CONSTRAINT idx_a_b_5 UNIQUE (a, b));- changeType: 0+ changeType: 1want:- status: 2code: 813diff --git a/backend/plugin/advisor/pg/test/naming_column.yaml b/backend/plugin/advisor/pg/test/naming_column.yamlindex 7a13a34847..be23b22c8c 100644--- a/backend/plugin/advisor/pg/test/naming_column.yaml+++ b/backend/plugin/advisor/pg/test/naming_column.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE book(id int, "creatorId" int)- changeType: 0+ changeType: 1want:- status: 2code: 302@@ -10,15 +10,15 @@column: 0endposition: null- statement: CREATE TABLE book(id int, qavszgslczmsacubtvyymzhojfytkcmon int)- changeType: 0+ changeType: 1- statement: CREATE TABLE book(id int, creator_Id int)- changeType: 0+ changeType: 1- statement: CREATE TABLE book(id int, creator_id int)- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(id int, creator_id int);ALTER TABLE book ADD COLUMN "creatorId" int- changeType: 0+ changeType: 1want:- status: 2code: 302@@ -31,11 +31,11 @@- statement: |-CREATE TABLE book(id int, creator_id int);ALTER TABLE book ADD COLUMN "creator" int- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(id int, creator_id int);ALTER TABLE book RENAME COLUMN creator_id TO "creatorId"- changeType: 0+ changeType: 1want:- status: 2code: 302@@ -48,4 +48,4 @@- statement: |-CREATE TABLE book(id int, creator_id int);ALTER TABLE book RENAME COLUMN creator_id TO "creator"- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/pg/test/naming_fully_qualified.yaml b/backend/plugin/advisor/pg/test/naming_fully_qualified.yamlindex 16114f50a0..d31ca2e5e1 100644--- a/backend/plugin/advisor/pg/test/naming_fully_qualified.yaml+++ b/backend/plugin/advisor/pg/test/naming_fully_qualified.yaml@@ -3,7 +3,7 @@INSERT INTO public.pokesv1 VALUES (1, '1');CREATE TABLE public.pokes (foo int);CREATE TABLE pokesv2 (foo int, bar varchar);- changeType: 0+ changeType: 1want:- status: 2code: 310@@ -17,7 +17,7 @@CREATE SEQUENCE public.seq;CREATE SEQUENCE seq;DROP SEQUENCE public.seq- changeType: 0+ changeType: 1want:- status: 2code: 310@@ -33,7 +33,7 @@FOR EACH ROWEXECUTE PROCEDURE trigger_function();INSERT INTO bbdev.public.pokesv1 VALUES (1, '1');- changeType: 0+ changeType: 1want:- status: 2code: 310@@ -44,11 +44,11 @@column: 0endposition: null- statement: DROP TRIGGER test_trigger ON public.pokes;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE public.pokesv1 (foo int, bar varchar);ALTER TABLE pokesv1 RENAME TO pokesv2;- changeType: 0+ changeType: 1want:- status: 2code: 310@@ -62,7 +62,7 @@CREATE TABLE public.pokesv1 (foo int);INSERT INTO pokesv1(foo) VALUES (1);INSERT INTO public.pokesv1 VALUES (2);- changeType: 0+ changeType: 1want:- status: 2code: 310@@ -78,7 +78,7 @@UPDATE public.pokesv1 SET foo = 2 WHERE foo=1;UPDATE pokesv1 SET foo = 1 WHERE 1=1;UPDATE public.pokesv1 SET foo = 1 WHERE 1 > 1;- changeType: 0+ changeType: 1want:- status: 2code: 310@@ -89,7 +89,7 @@column: 0endposition: null- statement: "CREATE TABLE public.pokes (foo int); \nSELECT * FROM (SELECT (id) FROM tech_book) AS foo;"- changeType: 0+ changeType: 1want:- status: 2code: 310@@ -100,4 +100,4 @@column: 0endposition: null- statement: "CREATE TABLE public.pokes (foo int);\nWITH foo1 AS (SELECT * FROM public.tech_book) \nSELECT * FROM foo1;"- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/pg/test/naming_index_fk.yaml b/backend/plugin/advisor/pg/test/naming_index_fk.yamlindex 544d307271..87b0d18354 100644--- a/backend/plugin/advisor/pg/test/naming_index_fk.yaml+++ b/backend/plugin/advisor/pg/test/naming_index_fk.yaml@@ -1,7 +1,7 @@- statement: ALTER TABLE tech_book ADD CONSTRAINT fk_tech_book_author_id_author_id FOREIGN KEY (author_id) REFERENCES author (id)- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book ADD CONSTRAINT fk_author_id FOREIGN KEY (author_id) REFERENCES author (id)- changeType: 0+ changeType: 1want:- status: 2code: 305@@ -12,7 +12,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book ADD CONSTRAINT wlwflloczhmazamdotbibvqrrzyhmvkslvyzpmlmxt FOREIGN KEY (author_id) REFERENCES author (id)- changeType: 0+ changeType: 1want:- status: 2code: 305@@ -23,9 +23,9 @@column: 0endposition: null- statement: ALTER TABLE tech_book ADD COLUMN author_id INT CONSTRAINT fk_tech_book_author_id_author_id REFERENCES author (id)- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book ADD COLUMN author_id INT CONSTRAINT fk_author_id REFERENCES author (id)- changeType: 0+ changeType: 1want:- status: 2code: 305@@ -36,9 +36,9 @@column: 0endposition: null- statement: CREATE TABLE book(id INT, author_id INT, CONSTRAINT fk_book_author_id_author_id FOREIGN KEY (author_id) REFERENCES author (id))- changeType: 0+ changeType: 1- statement: CREATE TABLE book(id INT, author_id INT, CONSTRAINT fk_book_author_id FOREIGN KEY (author_id) REFERENCES author (id))- changeType: 0+ changeType: 1want:- status: 2code: 305@@ -49,14 +49,14 @@column: 0endposition: null- statement: CREATE TABLE book(id INT, author_id INT CONSTRAINT fk_book_author_id_author_id REFERENCES author (id))- changeType: 0+ changeType: 1- statement: |--- this is the first line.CREATE TABLE book(id INT,author_id INT CONSTRAINT fk_book_author_id REFERENCES author (id))- changeType: 0+ changeType: 1want:- status: 2code: 305diff --git a/backend/plugin/advisor/pg/test/naming_index_idx.yaml b/backend/plugin/advisor/pg/test/naming_index_idx.yamlindex 0ba7f6cd2b..c97fe71747 100644--- a/backend/plugin/advisor/pg/test/naming_index_idx.yaml+++ b/backend/plugin/advisor/pg/test/naming_index_idx.yaml@@ -1,7 +1,7 @@- statement: CREATE INDEX idx_tech_book_id_name ON tech_book(id, name)- changeType: 0+ changeType: 1- statement: CREATE INDEX tech_book_id_name ON tech_book(id, name)- changeType: 0+ changeType: 1want:- status: 2code: 303@@ -12,7 +12,7 @@column: 0endposition: null- statement: CREATE INDEX wfdtqyetsyoovcvikjlyfukxyjxxxhifl ON tech_book(id, name)- changeType: 0+ changeType: 1want:- status: 2code: 303@@ -23,9 +23,9 @@column: 0endposition: null- statement: ALTER INDEX old_index RENAME TO idx_tech_book_id_name- changeType: 0+ changeType: 1- statement: ALTER INDEX old_index RENAME TO idx_tech_book- changeType: 0+ changeType: 1want:- status: 2code: 303diff --git a/backend/plugin/advisor/pg/test/naming_index_pk.yaml b/backend/plugin/advisor/pg/test/naming_index_pk.yamlindex 84611bdf32..d16aa1ac63 100644--- a/backend/plugin/advisor/pg/test/naming_index_pk.yaml+++ b/backend/plugin/advisor/pg/test/naming_index_pk.yaml@@ -1,7 +1,7 @@- statement: ALTER TABLE tech_book ADD CONSTRAINT pk_tech_book_id_name PRIMARY KEY (id, name)- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book ADD CONSTRAINT tech_book_id_name PRIMARY KEY (id, name)- changeType: 0+ changeType: 1want:- status: 2code: 306@@ -12,7 +12,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book ADD CONSTRAINT udmhjtnsaablcmjhqcznfiwtnevcehcvw PRIMARY KEY (id, name)- changeType: 0+ changeType: 1want:- status: 2code: 306@@ -23,7 +23,7 @@column: 0endposition: null- statement: CREATE TABLE book(id INT, name VARCHAR(20), CONSTRAINT pk_book_name PRIMARY KEY (name))- changeType: 0+ changeType: 1- statement: |--- this is the first line.CREATE TABLE book(@@ -31,7 +31,7 @@name VARCHAR(20),CONSTRAINT tech_book_name PRIMARY KEY (name))- changeType: 0+ changeType: 1want:- status: 2code: 306@@ -42,13 +42,13 @@column: 0endposition: null- statement: CREATE TABLE book(id INT, name VARCHAR(20), PRIMARY KEY (name))- changeType: 0+ changeType: 1- statement: CREATE TABLE book(id INT, name VARCHAR(20) PRIMARY KEY)- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book ADD CONSTRAINT pk_tech_book_id_name PRIMARY KEY USING INDEX old_index- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book ADD CONSTRAINT pk_tech_book PRIMARY KEY USING INDEX old_index- changeType: 0+ changeType: 1want:- status: 2code: 306@@ -59,9 +59,9 @@column: 0endposition: null- statement: ALTER TABLE tech_book RENAME CONSTRAINT old_pk TO pk_tech_book_id_name- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book RENAME CONSTRAINT old_pk TO pk_tech_book- changeType: 0+ changeType: 1want:- status: 2code: 306@@ -72,9 +72,9 @@column: 0endposition: null- statement: ALTER INDEX old_pk RENAME TO pk_tech_book_id_name- changeType: 0+ changeType: 1- statement: ALTER INDEX old_pk RENAME TO pk_tech_book- changeType: 0+ changeType: 1want:- status: 2code: 306diff --git a/backend/plugin/advisor/pg/test/naming_index_uk.yaml b/backend/plugin/advisor/pg/test/naming_index_uk.yamlindex afa3ba9bfa..08282fb5ff 100644--- a/backend/plugin/advisor/pg/test/naming_index_uk.yaml+++ b/backend/plugin/advisor/pg/test/naming_index_uk.yaml@@ -1,7 +1,7 @@- statement: CREATE UNIQUE INDEX uk_tech_book_id_name ON tech_book(id, name)- changeType: 0+ changeType: 1- statement: CREATE UNIQUE INDEX tech_book_id_name ON tech_book(id, name)- changeType: 0+ changeType: 1want:- status: 2code: 304@@ -12,7 +12,7 @@column: 0endposition: null- statement: CREATE UNIQUE INDEX dzfzqbhnkiiegdhvqjeqoevesfuwcmokrehxlapoqj ON tech_book(id, name)- changeType: 0+ changeType: 1want:- status: 2code: 304@@ -23,9 +23,9 @@column: 0endposition: null- statement: ALTER TABLE tech_book ADD CONSTRAINT uk_tech_book_id_name UNIQUE (id, name)- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book ADD CONSTRAINT tech_book_id_name UNIQUE (id, name)- changeType: 0+ changeType: 1want:- status: 2code: 304@@ -36,7 +36,7 @@column: 0endposition: null- statement: CREATE TABLE book(id INT PRIMARY KEY, name VARCHAR(20), CONSTRAINT uk_book_name UNIQUE (name))- changeType: 0+ changeType: 1- statement: |--- this is the first line.CREATE TABLE book(@@ -44,7 +44,7 @@name VARCHAR(20),CONSTRAINT book_name UNIQUE (name))- changeType: 0+ changeType: 1want:- status: 2code: 304@@ -55,13 +55,13 @@column: 0endposition: null- statement: CREATE TABLE book(id INT PRIMARY KEY, name VARCHAR(20), UNIQUE (name))- changeType: 0+ changeType: 1- statement: CREATE TABLE book(id INT PRIMARY KEY, name VARCHAR(20) UNIQUE)- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book ADD CONSTRAINT uk_tech_book_id_name UNIQUE USING INDEX old_index- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book ADD CONSTRAINT uk_tech_book UNIQUE USING INDEX old_index- changeType: 0+ changeType: 1want:- status: 2code: 304@@ -72,9 +72,9 @@column: 0endposition: null- statement: ALTER TABLE tech_book RENAME CONSTRAINT old_uk TO uk_tech_book_id_name- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book RENAME CONSTRAINT old_uk TO uk_tech_book- changeType: 0+ changeType: 1want:- status: 2code: 304@@ -85,9 +85,9 @@column: 0endposition: null- statement: ALTER INDEX old_uk RENAME TO uk_tech_book_id_name- changeType: 0+ changeType: 1- statement: ALTER INDEX old_uk RENAME TO uk_tech_book- changeType: 0+ changeType: 1want:- status: 2code: 304diff --git a/backend/plugin/advisor/pg/test/naming_table.yaml b/backend/plugin/advisor/pg/test/naming_table.yamlindex 281b351b7a..6331449094 100644--- a/backend/plugin/advisor/pg/test/naming_table.yaml+++ b/backend/plugin/advisor/pg/test/naming_table.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE "techBook"(id int, name varchar(255))- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -10,9 +10,9 @@column: 0endposition: null- statement: CREATE TABLE "rlcmidzlevbivwvcntihenpoibtiutqeb"(id int, name varchar(255))- changeType: 0+ changeType: 1- statement: CREATE TABLE _techBook(id int, name varchar(255))- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -23,11 +23,11 @@column: 0endposition: null- statement: CREATE TABLE techBook(id int, name varchar(255))- changeType: 0+ changeType: 1- statement: CREATE TABLE book(id int, name varchar(255))- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book RENAME TO "TechBook"- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -40,11 +40,11 @@- statement: |-create table techBook(id int);ALTER TABLE techBook RENAME TO tech_book_tmp;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE _techBook(id int, name varchar(255));ALTER TABLE tech_book RENAME TO "TechBook";- changeType: 0+ changeType: 1want:- status: 2code: 301diff --git a/backend/plugin/advisor/pg/test/schema_backward_compatibility.yaml b/backend/plugin/advisor/pg/test/schema_backward_compatibility.yamlindex e6199ba5bf..66c7f50d7e 100644--- a/backend/plugin/advisor/pg/test/schema_backward_compatibility.yaml+++ b/backend/plugin/advisor/pg/test/schema_backward_compatibility.yaml@@ -1,5 +1,5 @@- statement: ALTER TABLE tech_book ALTER COLUMN name TYPE TEXT- changeType: 0+ changeType: 1want:- status: 2code: 111diff --git a/backend/plugin/advisor/pg/test/statement_add_check_not_valid.yaml b/backend/plugin/advisor/pg/test/statement_add_check_not_valid.yamlindex 9a310484a0..cdbe0d8eeb 100644--- a/backend/plugin/advisor/pg/test/statement_add_check_not_valid.yaml+++ b/backend/plugin/advisor/pg/test/statement_add_check_not_valid.yaml@@ -1,5 +1,5 @@- statement: alter table tech_book add constraint check_id check(id > 0);- changeType: 0+ changeType: 1want:- status: 2code: 211@@ -10,4 +10,4 @@column: 0endposition: null- statement: alter table tech_book add constraint check_id check(id > 0) NOT VALID;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/pg/test/statement_add_foreign_key_not_valid.yaml b/backend/plugin/advisor/pg/test/statement_add_foreign_key_not_valid.yamlindex 6664f181e3..d25ff0b339 100644--- a/backend/plugin/advisor/pg/test/statement_add_foreign_key_not_valid.yaml+++ b/backend/plugin/advisor/pg/test/statement_add_foreign_key_not_valid.yaml@@ -11,7 +11,7 @@result JSONB NOT NULL DEFAULT '{}');ALTER TABLE task_run ADD CONSTRAINT task_run_task_id_fk_task_id FOREIGN KEY (task_id) REFERENCES task (id);- changeType: 0+ changeType: 1want:- status: 2code: 229@@ -34,4 +34,4 @@result JSONB NOT NULL DEFAULT '{}');ALTER TABLE task_run ADD CONSTRAINT task_run_task_id_fk_task_id FOREIGN KEY (task_id) REFERENCES task (id) NOT VALID;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/pg/test/statement_affected_row_limit.yaml b/backend/plugin/advisor/pg/test/statement_affected_row_limit.yamlindex 45ecb65167..1adfbe25f1 100644--- a/backend/plugin/advisor/pg/test/statement_affected_row_limit.yaml+++ b/backend/plugin/advisor/pg/test/statement_affected_row_limit.yaml@@ -1,4 +1,4 @@- statement: DELETE FROM tech_book WHERE a > 1- changeType: 0+ changeType: 1- statement: UPDATE tech_book SET id = 1- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/pg/test/statement_check_set_role_variable.yaml b/backend/plugin/advisor/pg/test/statement_check_set_role_variable.yamlindex 93efe84749..709c8d6960 100644--- a/backend/plugin/advisor/pg/test/statement_check_set_role_variable.yaml+++ b/backend/plugin/advisor/pg/test/statement_check_set_role_variable.yaml@@ -1,5 +1,5 @@- statement: SET SESSION ROLE joe; SELECT * FROM t- changeType: 0+ changeType: 1- statement: INSERT INTO t (id) VALUES (1);changeType: 2want:diff --git a/backend/plugin/advisor/pg/test/statement_create_specify_schema.yaml b/backend/plugin/advisor/pg/test/statement_create_specify_schema.yamlindex e959df2c5e..14c22b4748 100644--- a/backend/plugin/advisor/pg/test/statement_create_specify_schema.yaml+++ b/backend/plugin/advisor/pg/test/statement_create_specify_schema.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE t(id int);- changeType: 0+ changeType: 1want:- status: 2code: 216@@ -10,4 +10,4 @@column: 0endposition: null- statement: CREATE TABLE public.t(id int);- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/pg/test/statement_disallow_add_column_with_default.yaml b/backend/plugin/advisor/pg/test/statement_disallow_add_column_with_default.yamlindex 0451dcf330..331a292748 100644--- a/backend/plugin/advisor/pg/test/statement_disallow_add_column_with_default.yaml+++ b/backend/plugin/advisor/pg/test/statement_disallow_add_column_with_default.yaml@@ -1,7 +1,7 @@- statement: ALTER TABLE tech_book ADD COLUMN c int;- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book ADD COLUMN c int DEFAULT 0;- changeType: 0+ changeType: 1want:- status: 2code: 210diff --git a/backend/plugin/advisor/pg/test/statement_disallow_add_not_null.yaml b/backend/plugin/advisor/pg/test/statement_disallow_add_not_null.yamlindex 3c8e081b23..cbbdc63cdb 100644--- a/backend/plugin/advisor/pg/test/statement_disallow_add_not_null.yaml+++ b/backend/plugin/advisor/pg/test/statement_disallow_add_not_null.yaml@@ -1,5 +1,5 @@- statement: alter table tech_book alter column name set not null;- changeType: 0+ changeType: 1want:- status: 2code: 212@@ -12,4 +12,4 @@- statement: |-alter table tech_book add constraint check_name_not_null check(name IS NOT NULL) NOT VALID;alter table tech_book validate constraint check_name_not_null;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/pg/test/statement_disallow_commit.yaml b/backend/plugin/advisor/pg/test/statement_disallow_commit.yamlindex 10735b4545..66ce58abf6 100644--- a/backend/plugin/advisor/pg/test/statement_disallow_commit.yaml+++ b/backend/plugin/advisor/pg/test/statement_disallow_commit.yaml@@ -2,7 +2,7 @@START TRANSACTION;CREATE TABLE techBook(id int, name varchar(255));COMMIT;- changeType: 0+ changeType: 1want:- status: 2code: 206@@ -20,7 +20,7 @@START TRANSACTION;INSERT INTO techBook(id, name) VALUES(1, "book");COMMIT;- changeType: 0+ changeType: 1want:- status: 2code: 206diff --git a/backend/plugin/advisor/pg/test/statement_disallow_on_del_cascade.yaml b/backend/plugin/advisor/pg/test/statement_disallow_on_del_cascade.yamlindex 9fad83822e..bd5362fab3 100644--- a/backend/plugin/advisor/pg/test/statement_disallow_on_del_cascade.yaml+++ b/backend/plugin/advisor/pg/test/statement_disallow_on_del_cascade.yaml@@ -1,12 +1,12 @@- statement: TRUNCATE TABLE issues CASCADE;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE users (tenant_id integer REFERENCES tenants ON DELETE CASCADE,user_id integer NOT NULL,PRIMARY KEY (tenant_id, user_id));- changeType: 0+ changeType: 1want:- status: 2code: 213@@ -23,7 +23,7 @@PRIMARY KEY (tenant_id, user_id));COMMENT ON TABLE users IS 'CASCADE COMMENT';- changeType: 0+ changeType: 1- statement: |-TRUNCATE TABLE tech_book CASCADE;DROP TABLE tech_book CASCADE;@@ -32,7 +32,7 @@user_id integer NOT NULL,PRIMARY KEY (tenant_id, user_id));- changeType: 0+ changeType: 1want:- status: 2code: 213diff --git a/backend/plugin/advisor/pg/test/statement_disallow_rm_tbl_cascade.yaml b/backend/plugin/advisor/pg/test/statement_disallow_rm_tbl_cascade.yamlindex 98bd84ab4f..5da1d4e384 100644--- a/backend/plugin/advisor/pg/test/statement_disallow_rm_tbl_cascade.yaml+++ b/backend/plugin/advisor/pg/test/statement_disallow_rm_tbl_cascade.yaml@@ -1,5 +1,5 @@- statement: TRUNCATE TABLE issues CASCADE;- changeType: 0+ changeType: 1want:- status: 2code: 213@@ -15,7 +15,7 @@user_id integer NOT NULL,PRIMARY KEY (tenant_id, user_id));- changeType: 0+ changeType: 1- statement: |-CREATE TABLE users (tenant_id integer,@@ -23,7 +23,7 @@PRIMARY KEY (tenant_id, user_id));COMMENT ON TABLE users IS 'CASCADE COMMENT';- changeType: 0+ changeType: 1- statement: |-TRUNCATE TABLE tech_book CASCADE;DROP TABLE tech_book CASCADE;@@ -32,7 +32,7 @@user_id integer NOT NULL,PRIMARY KEY (tenant_id, user_id));- changeType: 0+ changeType: 1want:- status: 2code: 213diff --git a/backend/plugin/advisor/pg/test/statement_dml_dry_run.yaml b/backend/plugin/advisor/pg/test/statement_dml_dry_run.yamlindex 68885e98ba..291d9d0089 100644--- a/backend/plugin/advisor/pg/test/statement_dml_dry_run.yaml+++ b/backend/plugin/advisor/pg/test/statement_dml_dry_run.yaml@@ -1,4 +1,4 @@- statement: INSERT INTO tech_book values(1, 'a')- changeType: 0+ changeType: 1- statement: DELETE FROM tech_book- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/pg/test/statement_insert_disallow_order_by_rand.yaml b/backend/plugin/advisor/pg/test/statement_insert_disallow_order_by_rand.yamlindex c7e7f7c1b8..b669c7d165 100644--- a/backend/plugin/advisor/pg/test/statement_insert_disallow_order_by_rand.yaml+++ b/backend/plugin/advisor/pg/test/statement_insert_disallow_order_by_rand.yaml@@ -1,7 +1,7 @@- statement: INSERT INTO tech_book VALUES(1, "a")- changeType: 0+ changeType: 1- statement: INSERT INTO tech_book SELECT * FROM tech_book ORDER BY random()- changeType: 0+ changeType: 1want:- status: 2code: 1108diff --git a/backend/plugin/advisor/pg/test/statement_insert_must_specify_column.yaml b/backend/plugin/advisor/pg/test/statement_insert_must_specify_column.yamlindex 749b0c4482..797bb0af01 100644--- a/backend/plugin/advisor/pg/test/statement_insert_must_specify_column.yaml+++ b/backend/plugin/advisor/pg/test/statement_insert_must_specify_column.yaml@@ -1,7 +1,7 @@- statement: INSERT INTO tech_book(id, name) VALUES (1, '1')- changeType: 0+ changeType: 1- statement: INSERT INTO tech_book VALUES (1, '1')- changeType: 0+ changeType: 1want:- status: 2code: 1107diff --git a/backend/plugin/advisor/pg/test/statement_insert_row_limit.yaml b/backend/plugin/advisor/pg/test/statement_insert_row_limit.yamlindex 076fd6dba4..c72a05b224 100644--- a/backend/plugin/advisor/pg/test/statement_insert_row_limit.yaml+++ b/backend/plugin/advisor/pg/test/statement_insert_row_limit.yaml@@ -1,7 +1,7 @@- statement: INSERT INTO tech_book values(1, 'a')- changeType: 0+ changeType: 1- statement: INSERT INTO tech_book values(1, 'a'), (2, 'b'), (3, 'c'), (4, 'd'), (5, 'e'), (6, 'f')- changeType: 0+ changeType: 1want:- status: 2code: 1101@@ -12,4 +12,4 @@column: 0endposition: null- statement: INSERT INTO tech_book SELECT * FROM tech_book;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/pg/test/statement_maximum_limit_value.yaml b/backend/plugin/advisor/pg/test/statement_maximum_limit_value.yamlindex 2a5837919e..7c53075e8d 100644--- a/backend/plugin/advisor/pg/test/statement_maximum_limit_value.yaml+++ b/backend/plugin/advisor/pg/test/statement_maximum_limit_value.yaml@@ -1,6 +1,6 @@- statement: |SELECT * FROM employee LIMIT 1000000;- changeType: 0+ changeType: 1want:- status: 2code: 222diff --git a/backend/plugin/advisor/pg/test/statement_merge_alter_table.yaml b/backend/plugin/advisor/pg/test/statement_merge_alter_table.yamlindex 7b559090b7..b3f7f4bef9 100644--- a/backend/plugin/advisor/pg/test/statement_merge_alter_table.yaml+++ b/backend/plugin/advisor/pg/test/statement_merge_alter_table.yaml@@ -1,10 +1,10 @@- statement: ALTER TABLE tech_book ADD COLUMN a int- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int);ALTER TABLE tech_book ADD COLUMN a int;ALTER TABLE t ADD COLUMN b int;- changeType: 0+ changeType: 1want:- status: 2code: 207diff --git a/backend/plugin/advisor/pg/test/statement_non_transactional.yaml b/backend/plugin/advisor/pg/test/statement_non_transactional.yamlindex 5fe035c84f..707018990f 100644--- a/backend/plugin/advisor/pg/test/statement_non_transactional.yaml+++ b/backend/plugin/advisor/pg/test/statement_non_transactional.yaml@@ -1,7 +1,7 @@- statement: CREATE INDEX idx_tech_book_id_name ON tech_book(id, name)- changeType: 0+ changeType: 1- statement: CREATE INDEX CONCURRENTLY tech_book_id_name ON tech_book(id, name)- changeType: 0+ changeType: 1want:- status: 2code: 230@@ -12,7 +12,7 @@column: 0endposition: null- statement: VACUUM FULL tech_book- changeType: 0+ changeType: 1want:- status: 2code: 230diff --git a/backend/plugin/advisor/pg/test/statement_select_no_select_all.yaml b/backend/plugin/advisor/pg/test/statement_select_no_select_all.yamlindex 8a32534ec0..3e4965a0d6 100644--- a/backend/plugin/advisor/pg/test/statement_select_no_select_all.yaml+++ b/backend/plugin/advisor/pg/test/statement_select_no_select_all.yaml@@ -1,5 +1,5 @@- statement: SELECT * FROM t- changeType: 0+ changeType: 1want:- status: 2code: 203@@ -10,9 +10,9 @@column: 0endposition: null- statement: SELECT a, b FROM t- changeType: 0+ changeType: 1- statement: SELECT a, b FROM (SELECT * from t1, t2) t- changeType: 0+ changeType: 1want:- status: 2code: 203@@ -23,7 +23,7 @@column: 0endposition: null- statement: INSERT INTO t SELECT * FROM t1- changeType: 0+ changeType: 1want:- status: 2code: 203diff --git a/backend/plugin/advisor/pg/test/statement_where_no_leading_wildcard_like.yaml b/backend/plugin/advisor/pg/test/statement_where_no_leading_wildcard_like.yamlindex 241f8c6b50..6df20f31e3 100644--- a/backend/plugin/advisor/pg/test/statement_where_no_leading_wildcard_like.yaml+++ b/backend/plugin/advisor/pg/test/statement_where_no_leading_wildcard_like.yaml@@ -1,7 +1,7 @@- statement: SELECT * FROM t WHERE a LIKE 'abc%'- changeType: 0+ changeType: 1- statement: SELECT * FROM t WHERE a LIKE '%abc'- changeType: 0+ changeType: 1want:- status: 2code: 204@@ -12,7 +12,7 @@column: 0endposition: null- statement: SELECT * FROM t WHERE a LIKE 'abc' OR a LIKE '%abc'- changeType: 0+ changeType: 1want:- status: 2code: 204@@ -23,7 +23,7 @@column: 0endposition: null- statement: SELECT * FROM t WHERE a LIKE '%acc' OR a LIKE '%abc'- changeType: 0+ changeType: 1want:- status: 2code: 204@@ -34,7 +34,7 @@column: 0endposition: null- statement: SELECT * FROM (SELECT * FROM t WHERE a LIKE '%acc' OR a LIKE '%abc') t1- changeType: 0+ changeType: 1want:- status: 2code: 204diff --git a/backend/plugin/advisor/pg/test/statement_where_require_select.yaml b/backend/plugin/advisor/pg/test/statement_where_require_select.yamlindex cdee2fc94b..0ab57157ae 100644--- a/backend/plugin/advisor/pg/test/statement_where_require_select.yaml+++ b/backend/plugin/advisor/pg/test/statement_where_require_select.yaml@@ -1,5 +1,5 @@- statement: SELECT a FROM t- changeType: 0+ changeType: 1want:- status: 2code: 202@@ -10,9 +10,9 @@column: 0endposition: null- statement: SELECT a FROM t WHERE a > 0- changeType: 0+ changeType: 1- statement: SELECT a FROM t WHERE a > (SELECT max(id) FROM user)- changeType: 0+ changeType: 1want:- status: 2code: 202@@ -23,4 +23,4 @@column: 0endposition: null- statement: SELECT 1- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/pg/test/statement_where_require_update_delete.yaml b/backend/plugin/advisor/pg/test/statement_where_require_update_delete.yamlindex 92ca695582..58533cf9a0 100644--- a/backend/plugin/advisor/pg/test/statement_where_require_update_delete.yaml+++ b/backend/plugin/advisor/pg/test/statement_where_require_update_delete.yaml@@ -1,5 +1,5 @@- statement: DELETE FROM t1- changeType: 0+ changeType: 1want:- status: 2code: 202@@ -10,7 +10,7 @@column: 0endposition: null- statement: UPDATE t1 SET a = 1- changeType: 0+ changeType: 1want:- status: 2code: 202@@ -21,6 +21,6 @@column: 0endposition: null- statement: DELETE FROM t1 WHERE a > 0- changeType: 0+ changeType: 1- statement: UPDATE t1 SET a = 1 WHERE a > 10- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/pg/test/system_charset_allowlist.yaml b/backend/plugin/advisor/pg/test/system_charset_allowlist.yamlindex 3300c666eb..a73f504104 100644--- a/backend/plugin/advisor/pg/test/system_charset_allowlist.yaml+++ b/backend/plugin/advisor/pg/test/system_charset_allowlist.yaml@@ -1,9 +1,9 @@- statement: CREATE DATABASE test WITH ENCODING 'UTF8'- changeType: 0+ changeType: 1- statement: CREATE DATABASE test- changeType: 0+ changeType: 1- statement: CREATE DATABASE test WITH ENCODING 'LATIN1'- changeType: 0+ changeType: 1want:- status: 2code: 1001@@ -14,4 +14,4 @@column: 0endposition: null- statement: /* this is a comment */- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/pg/test/system_collation_allowlist.yaml b/backend/plugin/advisor/pg/test/system_collation_allowlist.yamlindex 90a156c133..4be6d1219e 100644--- a/backend/plugin/advisor/pg/test/system_collation_allowlist.yaml+++ b/backend/plugin/advisor/pg/test/system_collation_allowlist.yaml@@ -1,7 +1,7 @@- statement: CREATE TABLE t(a text COLLATE utf8mb4_0900_ai_ci)- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a text COLLATE "unknown")- changeType: 0+ changeType: 1want:- status: 2code: 1201@@ -12,7 +12,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book ADD COLUMN c1 text COLLATE "unknown"- changeType: 0+ changeType: 1want:- status: 2code: 1201@@ -23,7 +23,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book ALTER COLUMN id TYPE text COLLATE "unknown"- changeType: 0+ changeType: 1want:- status: 2code: 1201diff --git a/backend/plugin/advisor/pg/test/system_comment_length.yaml b/backend/plugin/advisor/pg/test/system_comment_length.yamlindex 5cf3be82ad..8f2a84eb72 100644--- a/backend/plugin/advisor/pg/test/system_comment_length.yaml+++ b/backend/plugin/advisor/pg/test/system_comment_length.yaml@@ -1,7 +1,7 @@- statement: comment on column public.name is 'is a column name'- changeType: 0+ changeType: 1- statement: comment on column public.name is 'is a to long column name'- changeType: 0+ changeType: 1want:- status: 2code: 1301@@ -12,9 +12,9 @@column: 0endposition: null- statement: comment on table public is 'is a table name'- changeType: 0+ changeType: 1- statement: comment on table public is 'is a to long table name long long long long long long long'- changeType: 0+ changeType: 1want:- status: 2code: 1301diff --git a/backend/plugin/advisor/pg/test/table_comment.yaml b/backend/plugin/advisor/pg/test/table_comment.yamlindex 981bd1327c..1bdd1be352 100644--- a/backend/plugin/advisor/pg/test/table_comment.yaml+++ b/backend/plugin/advisor/pg/test/table_comment.yaml@@ -1,9 +1,9 @@- statement: |-CREATE TABLE t(a int);COMMENT ON TABLE t IS 'comments';- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a int);- changeType: 0+ changeType: 1want:- status: 2code: 1032@@ -17,7 +17,7 @@CREATE TABLE t(a int);CREATE TABLE d(a int);COMMENT ON TABLE t IS 'comments';- changeType: 0+ changeType: 1want:- status: 2code: 1032@@ -31,7 +31,7 @@CREATE TABLE t(a int);COMMENT ON TABLE t IS 'comments';COMMENT ON TABLE t IS '';- changeType: 0+ changeType: 1want:- status: 2code: 1032@@ -45,7 +45,7 @@CREATE TABLE t(a int);COMMENT ON TABLE t IS 'comments';COMMENT ON TABLE t IS NULL;- changeType: 0+ changeType: 1want:- status: 2code: 1032@@ -58,7 +58,7 @@- statement: |-CREATE TABLE t(a int);COMMENT ON TABLE t IS 'looooooong comments';- changeType: 0+ changeType: 1want:- status: 2code: 1301diff --git a/backend/plugin/advisor/pg/test/table_disallow_partition.yaml b/backend/plugin/advisor/pg/test/table_disallow_partition.yamlindex 55da4e8451..b8d8cb3cfb 100644--- a/backend/plugin/advisor/pg/test/table_disallow_partition.yaml+++ b/backend/plugin/advisor/pg/test/table_disallow_partition.yaml@@ -1,7 +1,7 @@- statement: CREATE TABLE t(a int)- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a int) PARTITION BY RANGE (a);- changeType: 0+ changeType: 1want:- status: 2code: 608@@ -12,7 +12,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book ATTACH PARTITION p1 DEFAULT;- changeType: 0+ changeType: 1want:- status: 2code: 608diff --git a/backend/plugin/advisor/pg/test/table_drop_naming_convention.yaml b/backend/plugin/advisor/pg/test/table_drop_naming_convention.yamlindex b1271e3866..0bc06a44c6 100644--- a/backend/plugin/advisor/pg/test/table_drop_naming_convention.yaml+++ b/backend/plugin/advisor/pg/test/table_drop_naming_convention.yaml@@ -1,7 +1,7 @@- statement: DROP TABLE IF EXISTS foo_delete- changeType: 0+ changeType: 1- statement: DROP TABLE IF EXISTS foo- changeType: 0+ changeType: 1want:- status: 2code: 603@@ -12,7 +12,7 @@column: 0endposition: null- statement: DROP TABLE IF EXISTS foo_delete, bar- changeType: 0+ changeType: 1want:- status: 2code: 603diff --git a/backend/plugin/advisor/pg/test/table_no_foreign_key.yaml b/backend/plugin/advisor/pg/test/table_no_foreign_key.yamlindex acd4481b0c..8bb4c676ca 100644--- a/backend/plugin/advisor/pg/test/table_no_foreign_key.yaml+++ b/backend/plugin/advisor/pg/test/table_no_foreign_key.yaml@@ -1,5 +1,5 @@- statement: ALTER TABLE tech_book ADD CONSTRAINT fk_tech_book_author_id_author_id FOREIGN KEY (author_id) REFERENCES author (id)- changeType: 0+ changeType: 1want:- status: 2code: 602@@ -10,7 +10,7 @@column: 0endposition: null- statement: CREATE TABLE book(id INT, author_id INT, CONSTRAINT fk_book_author_id_author_id FOREIGN KEY (author_id) REFERENCES author (id))- changeType: 0+ changeType: 1want:- status: 2code: 602diff --git a/backend/plugin/advisor/pg/test/table_require_pk.yaml b/backend/plugin/advisor/pg/test/table_require_pk.yamlindex 8440f60aca..50ae924304 100644--- a/backend/plugin/advisor/pg/test/table_require_pk.yaml+++ b/backend/plugin/advisor/pg/test/table_require_pk.yaml@@ -1,9 +1,9 @@- statement: CREATE TABLE t(id INT PRIMARY KEY)- changeType: 0+ changeType: 1- statement: CREATE TABLE t(id INT, PRIMARY KEY (id))- changeType: 0+ changeType: 1- statement: CREATE TABLE t(id INT)- changeType: 0+ changeType: 1want:- status: 2code: 601@@ -14,7 +14,7 @@column: 0endposition: null- statement: ALTER TABLE "tech_book" DROP CONSTRAINT "old_pk"- changeType: 0+ changeType: 1want:- status: 2code: 601@@ -25,11 +25,11 @@column: 0endposition: null- statement: ALTER TABLE "tech_book" DROP CONSTRAINT "old_index"- changeType: 0+ changeType: 1- statement: ALTER TABLE "tech_book" DROP CONSTRAINT constraint_not_in_catalog- changeType: 0+ changeType: 1- statement: ALTER TABLE "tech_book" DROP COLUMN id- changeType: 0+ changeType: 1want:- status: 2code: 601@@ -42,4 +42,4 @@- statement: |-ALTER TABLE tech_book ADD COLUMN column_not_in_pk int;ALTER TABLE "tech_book" DROP COLUMN column_not_in_pk;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/snowflake/test/column_maximum_varchar_length.yaml b/backend/plugin/advisor/snowflake/test/column_maximum_varchar_length.yamlindex d1d91778c0..1637365f19 100644--- a/backend/plugin/advisor/snowflake/test/column_maximum_varchar_length.yaml+++ b/backend/plugin/advisor/snowflake/test/column_maximum_varchar_length.yaml@@ -1,7 +1,7 @@- statement: CREATE TABLE CUSTOMER(NAME VARCHAR(20));- changeType: 0+ changeType: 1- statement: CREATE TABLE CUSTOMER(NAME VARCHAR(3000));- changeType: 0+ changeType: 1want:- status: 2code: 422@@ -12,7 +12,7 @@column: 0endposition: null- statement: CREATE TABLE CUSTOMER(NAME VARCHAR);- changeType: 0+ changeType: 1want:- status: 2code: 422@@ -23,7 +23,7 @@column: 0endposition: null- statement: ALTER TABLE PUBLIC.CUSTOMER ADD NAME_2 VARCHAR(22225);- changeType: 0+ changeType: 1want:- status: 2code: 422@@ -34,7 +34,7 @@column: 0endposition: null- statement: ALTER TABLE PUBLIC.CUSTOMER MODIFY COLUMN NAME VARCHAR(22225);- changeType: 0+ changeType: 1want:- status: 2code: 422@@ -45,9 +45,9 @@column: 0endposition: null- statement: ALTER TABLE PUBLIC.CUSTOMER MODIFY COLUMN NAME VARCHAR(20);- changeType: 0+ changeType: 1- statement: ALTER TABLE PUBLIC.CUSTOMER MODIFY COLUMN NAME SET DATA TYPE VARCHAR(22225);- changeType: 0+ changeType: 1want:- status: 2code: 422diff --git a/backend/plugin/advisor/snowflake/test/column_no_null.yaml b/backend/plugin/advisor/snowflake/test/column_no_null.yamlindex 2a0eaa904a..c131d48ae6 100644--- a/backend/plugin/advisor/snowflake/test/column_no_null.yaml+++ b/backend/plugin/advisor/snowflake/test/column_no_null.yaml@@ -5,7 +5,7 @@age INT,address VARCHAR);- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -31,7 +31,7 @@address VARCHAR,PRIMARY KEY (id, age))- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -48,9 +48,9 @@age INT NOT NULL,address VARCHAR NOT NULL);- changeType: 0+ changeType: 1- statement: ALTER TABLE a ADD COLUMN age INT;- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -61,9 +61,9 @@column: 0endposition: null- statement: ALTER TABLE a ADD COLUMN age INT NOT NULL;- changeType: 0+ changeType: 1- statement: ALTER TABLE a ALTER COLUMN age DROP NOT NULL;- changeType: 0+ changeType: 1want:- status: 2code: 402diff --git a/backend/plugin/advisor/snowflake/test/column_required.yaml b/backend/plugin/advisor/snowflake/test/column_required.yamlindex fc5b124aa4..edf6ffc68b 100644--- a/backend/plugin/advisor/snowflake/test/column_required.yaml+++ b/backend/plugin/advisor/snowflake/test/column_required.yaml@@ -6,13 +6,13 @@"updated_ts" INT,"updater_id" INT);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t ("name" TEXT,"age" INT);- changeType: 0+ changeType: 1want:- status: 2code: 401@@ -61,7 +61,7 @@"created_ts" INT,"updater_id" INT);- changeType: 0+ changeType: 1want:- status: 2code: 401@@ -72,7 +72,7 @@column: 0endposition: null- statement: ALTER TABLE t DROP COLUMN "created_ts";- changeType: 0+ changeType: 1want:- status: 2code: 401@@ -83,6 +83,6 @@column: 0endposition: null- statement: ALTER TABLE t DROP COLUMN creator_id;- changeType: 0+ changeType: 1- statement: ALTER TABLE TARGET_TABLE ALTER COLUMN description DROP DEFAULT, COLUMN description DROP NOT NULL;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/snowflake/test/naming_identifier_case.yaml b/backend/plugin/advisor/snowflake/test/naming_identifier_case.yamlindex 6af74559d0..13858733db 100644--- a/backend/plugin/advisor/snowflake/test/naming_identifier_case.yaml+++ b/backend/plugin/advisor/snowflake/test/naming_identifier_case.yaml@@ -1,16 +1,16 @@- statement: |--- The rule should be friendly with engine behavior(i.e. stored and resolved as uppercase characters if not quoted)CREATE TABLE t(id INT);- changeType: 0+ changeType: 1- statement: CREATE TABLE t(ID INT);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(name VARCHAR,age INT,"address" VARCHAR);- changeType: 0+ changeType: 1want:- status: 2code: 309@@ -26,7 +26,7 @@age INT,"address" VARCHAR) AS SELECT a + 1, b + 2 FROM mytable;- changeType: 0+ changeType: 1want:- status: 2code: 309@@ -42,9 +42,9 @@age INT,address VARCHAR) AS SELECT a + 1, b + 2 FROM mytable;- changeType: 0+ changeType: 1- statement: ALTER TABLE mytable RENAME COLUMN name TO "address";- changeType: 0+ changeType: 1want:- status: 2code: 309@@ -55,4 +55,4 @@column: 0endposition: null- statement: ALTER TABLE mytable RENAME COLUMN name TO address;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/snowflake/test/naming_identifier_no_keyword.yaml b/backend/plugin/advisor/snowflake/test/naming_identifier_no_keyword.yamlindex c597207f96..7e62c63452 100644--- a/backend/plugin/advisor/snowflake/test/naming_identifier_no_keyword.yaml+++ b/backend/plugin/advisor/snowflake/test/naming_identifier_no_keyword.yaml@@ -3,7 +3,7 @@name VARCHAR,"CONNECT" VARCHAR);- changeType: 0+ changeType: 1want:- status: 2code: 308@@ -18,7 +18,7 @@name VARCHAR,"connect" VARCHAR);- changeType: 0+ changeType: 1want:- status: 2code: 308@@ -33,13 +33,13 @@name VARCHAR,age INT);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE mytable_copy (name INT,"connect" INT) AS SELECT a + 1, b + 2 FROM mytable;- changeType: 0+ changeType: 1want:- status: 2code: 308@@ -54,9 +54,9 @@name INT,age INT) AS SELECT a + 1, b + 2 FROM mytable;- changeType: 0+ changeType: 1- statement: ALTER TABLE mytable RENAME COLUMN name TO "connect";- changeType: 0+ changeType: 1want:- status: 2code: 308@@ -67,4 +67,4 @@column: 0endposition: null- statement: ALTER TABLE mytable RENAME COLUMN name TO age;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/snowflake/test/naming_table.yaml b/backend/plugin/advisor/snowflake/test/naming_table.yamlindex 39730528bc..955efe7801 100644--- a/backend/plugin/advisor/snowflake/test/naming_table.yaml+++ b/backend/plugin/advisor/snowflake/test/naming_table.yaml@@ -1,9 +1,9 @@- statement: CREATE TABLE UPPER_CASE_TABLE_NAME_WITHOUT_DOUBLE_QUOTES(ID INT);- changeType: 0+ changeType: 1- statement: CREATE TABLE "UPPER_CASE_TABLE_NAME_WITH_DOUBLE_QUOTES"(ID INT);- changeType: 0+ changeType: 1- statement: CREATE TABLE lower_case_table_name_without_double_quotes(ID INT);- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -14,7 +14,7 @@column: 0endposition: null- statement: CREATE TABLE "lower_case_table_name_with_double_quotes"(ID INT);- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -25,7 +25,7 @@column: 0endposition: null- statement: "CREATE TABLE \"\U0001F608EMOJI\U0001F604\"(ID INT);"- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -36,9 +36,9 @@column: 0endposition: null- statement: ALTER TABLE "lower_case_table_with_double_quotes" RENAME TO UPPER_CASE_TABLE_NAME_WITHOUT_DOUBLE_QUOTES;- changeType: 0+ changeType: 1- statement: ALTER TABLE UPPER_CASE_TABLE_NAME RENAME TO "lower_case_table_with_double_quotes";- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -51,7 +51,7 @@- statement: |-CREATE TABLE UPPER_CASE_TABLE_NAME_WITHOUT_DOUBLE_QUOTES(ID INT);ALTER TABLE UPPER_CASE_TABLE_NAME_WITHOUT_DOUBLE_QUOTES RENAME TO "lower_case_table_with_double_quotes";- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -64,7 +64,7 @@- statement: |-CREATE TABLE "lower_case_table_name_with_double_quotes"(ID INT);ALTER TABLE "lower_case_table_name_with_double_quotes" RENAME TO UPPER_CASE_TABLE_NAME_WITHOUT_DOUBLE_QUOTES;- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -77,7 +77,7 @@- statement: |-CREATE TABLE "lowercase"(ID INT);ALTER TABLE another_schema."lower_case" RENAME TO another_schema.UPPER_CASE_TABLE_NAME_WITHOUT_DOUBLE_QUOTES;- changeType: 0+ changeType: 1want:- status: 2code: 301diff --git a/backend/plugin/advisor/snowflake/test/naming_table_no_keyword.yaml b/backend/plugin/advisor/snowflake/test/naming_table_no_keyword.yamlindex 8f08e30bbe..9366803671 100644--- a/backend/plugin/advisor/snowflake/test/naming_table_no_keyword.yaml+++ b/backend/plugin/advisor/snowflake/test/naming_table_no_keyword.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE "CONNECT"(ID INT);- changeType: 0+ changeType: 1want:- status: 2code: 308@@ -8,7 +8,7 @@startposition: nullendposition: null- statement: CREATE TABLE "DB_NAME"."SCHEMA_NAME"."CONNECT"(ID INT);- changeType: 0+ changeType: 1want:- status: 2code: 308@@ -17,9 +17,9 @@startposition: nullendposition: null- statement: CREATE TABLE "DB_NAME"."SCHEMA_NAME"."TABLE_NAME"(ID INT);- changeType: 0+ changeType: 1- statement: ALTER TABLE "DB_NAME"."SCHEMA_NAME"."TABLE_NAME" RENAME TO "CONNECT";- changeType: 0+ changeType: 1want:- status: 2code: 308diff --git a/backend/plugin/advisor/snowflake/test/schema_backward_compatibility.yaml b/backend/plugin/advisor/snowflake/test/schema_backward_compatibility.yamlindex df59726a5f..32ab341411 100644--- a/backend/plugin/advisor/snowflake/test/schema_backward_compatibility.yaml+++ b/backend/plugin/advisor/snowflake/test/schema_backward_compatibility.yaml@@ -1,5 +1,5 @@- statement: DROP DATABASE DB;- changeType: 0+ changeType: 1want:- status: 2code: 101@@ -10,7 +10,7 @@column: 0endposition: null- statement: DROP SCHEMA SCHEMA1;- changeType: 0+ changeType: 1want:- status: 2code: 112@@ -21,7 +21,7 @@column: 0endposition: null- statement: DROP TABLE T;- changeType: 0+ changeType: 1want:- status: 2code: 103@@ -32,7 +32,7 @@column: 0endposition: null- statement: ALTER TABLE T DROP COLUMN COL1;- changeType: 0+ changeType: 1want:- status: 2code: 105@@ -45,7 +45,7 @@- statement: |-CREATE TABLE IF NOT EXISTS T(ID INT);DROP TABLE T;- changeType: 0+ changeType: 1want:- status: 2code: 103@@ -58,4 +58,4 @@- statement: |-CREATE TABLE T(ID INT);DROP TABLE T;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/snowflake/test/statement_select_no_select_all.yaml b/backend/plugin/advisor/snowflake/test/statement_select_no_select_all.yamlindex 2ff05e6e09..82b924dd68 100644--- a/backend/plugin/advisor/snowflake/test/statement_select_no_select_all.yaml+++ b/backend/plugin/advisor/snowflake/test/statement_select_no_select_all.yaml@@ -1,5 +1,5 @@- statement: SELECT * FROM t- changeType: 0+ changeType: 1want:- status: 2code: 203@@ -10,9 +10,9 @@column: 0endposition: null- statement: SELECT a, b FROM t- changeType: 0+ changeType: 1- statement: SELECT a, b FROM (SELECT * from t1, t2) t- changeType: 0+ changeType: 1want:- status: 2code: 203@@ -23,7 +23,7 @@column: 0endposition: null- statement: INSERT INTO t SELECT * FROM t1- changeType: 0+ changeType: 1want:- status: 2code: 203diff --git a/backend/plugin/advisor/snowflake/test/statement_where_require_select.yaml b/backend/plugin/advisor/snowflake/test/statement_where_require_select.yamlindex 2a36a8df8c..31d6e71a21 100644--- a/backend/plugin/advisor/snowflake/test/statement_where_require_select.yaml+++ b/backend/plugin/advisor/snowflake/test/statement_where_require_select.yaml@@ -1,5 +1,5 @@- statement: SELECT * FROM (SELECT * FROM TARGET_TABLE) AS a WHERE a.id = 1;- changeType: 0+ changeType: 1want:- status: 2code: 202@@ -10,7 +10,7 @@column: 0endposition: null- statement: SELECT * FROM t;- changeType: 0+ changeType: 1want:- status: 2code: 202@@ -21,7 +21,7 @@column: 0endposition: null- statement: SELECT * FROM t WHERE b = 2;- changeType: 0+ changeType: 1- statement: |-withalbum_info_1976 as (select m.album_ID, m.album_name, b.band_name@@ -32,7 +32,7 @@)select album_name, band_namefrom Journey_album_info_1976;- changeType: 0+ changeType: 1want:- status: 2code: 202@@ -56,7 +56,7 @@) AS filtered_source_tableON target_table.id = filtered_source_table.idWHEN MATCHED THEN UPDATE SET target_table.a = filtered_source_table.b;- changeType: 0+ changeType: 1want:- status: 2code: 202@@ -67,4 +67,4 @@column: 0endposition: null- statement: SELECT 1;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/snowflake/test/statement_where_require_update_delete.yaml b/backend/plugin/advisor/snowflake/test/statement_where_require_update_delete.yamlindex 67d6d04b71..17fc69b2de 100644--- a/backend/plugin/advisor/snowflake/test/statement_where_require_update_delete.yaml+++ b/backend/plugin/advisor/snowflake/test/statement_where_require_update_delete.yaml@@ -1,5 +1,5 @@- statement: UPDATE t SET a = 1;- changeType: 0+ changeType: 1want:- status: 2code: 202@@ -10,9 +10,9 @@column: 0endposition: null- statement: UPDATE t SET a = 1 WHERE b = 2;- changeType: 0+ changeType: 1- statement: DELETE FROM t;- changeType: 0+ changeType: 1want:- status: 2code: 202@@ -23,4 +23,4 @@column: 0endposition: null- statement: DELETE FROM t WHERE a = 1;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/snowflake/test/table_drop_naming_convention.yaml b/backend/plugin/advisor/snowflake/test/table_drop_naming_convention.yamlindex 74fa88e23e..f6a732b8b3 100644--- a/backend/plugin/advisor/snowflake/test/table_drop_naming_convention.yaml+++ b/backend/plugin/advisor/snowflake/test/table_drop_naming_convention.yaml@@ -1,7 +1,7 @@- statement: DROP TABLE IF EXISTS "FOO_delete"- changeType: 0+ changeType: 1- statement: DROP TABLE IF EXISTS FOO- changeType: 0+ changeType: 1want:- status: 2code: 603diff --git a/backend/plugin/advisor/snowflake/test/table_no_foreign_key.yaml b/backend/plugin/advisor/snowflake/test/table_no_foreign_key.yamlindex e5f804a4a2..0a9ee48268 100644--- a/backend/plugin/advisor/snowflake/test/table_no_foreign_key.yaml+++ b/backend/plugin/advisor/snowflake/test/table_no_foreign_key.yaml@@ -5,7 +5,7 @@FULL_NAME VARCHAR(10),POSITION VARCHAR(100));- changeType: 0+ changeType: 1want:- status: 2code: 602@@ -23,7 +23,7 @@POSITION VARCHAR(100),(ID) REFERENCES PERSON(ID));- changeType: 0+ changeType: 1want:- status: 2code: 602@@ -41,7 +41,7 @@POSITION VARCHAR(100));ALTER TABLE CUSTOMER ADD (ID) REFERENCES PERSON(ID);- changeType: 0+ changeType: 1want:- status: 2code: 602@@ -59,7 +59,7 @@POSITION VARCHAR(100));ALTER TABLE CUSTOMER DROP FOREIGN KEY (ID);- changeType: 0+ changeType: 1want:- status: 2code: 602@@ -77,7 +77,7 @@POSITION VARCHAR(100));ALTER TABLE CUSTOMER DROP FOREIGN KEY (ID);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE CUSTOMER(@@ -92,7 +92,7 @@POSITION VARCHAR(100));ALTER TABLE CUSTOMER ADD CONSTRAINT FK_CUSTOMER_PERSON FOREIGN KEY (ID) REFERENCES PERSON(ID);- changeType: 0+ changeType: 1want:- status: 2code: 602diff --git a/backend/plugin/advisor/snowflake/test/table_require_pk.yaml b/backend/plugin/advisor/snowflake/test/table_require_pk.yamlindex 625cd38b72..0b49c51895 100644--- a/backend/plugin/advisor/snowflake/test/table_require_pk.yaml+++ b/backend/plugin/advisor/snowflake/test/table_require_pk.yaml@@ -5,7 +5,7 @@FULL_NAME VARCHAR(10),POSITION VARCHAR(100));- changeType: 0+ changeType: 1- statement: |-CREATE TABLE CUSTOMER(@@ -14,7 +14,7 @@POSITION VARCHAR(100),CONSTRAINT PK_CUSTOMER PRIMARY KEY (ID));- changeType: 0+ changeType: 1- statement: |-CREATE TABLE CUSTOMER(@@ -22,7 +22,7 @@FULL_NAME VARCHAR(10),POSITION VARCHAR(100));- changeType: 0+ changeType: 1want:- status: 2code: 601@@ -40,7 +40,7 @@POSITION VARCHAR(100));ALTER TABLE CUSTOMER DROP PRIMARY KEY(ID);- changeType: 0+ changeType: 1want:- status: 2code: 601@@ -58,7 +58,7 @@POSITION VARCHAR(100));ALTER TABLE CUSTOMER ADD CONSTRAINT PK_CUSTOMER PRIMARY KEY (ID);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE CUSTOMER(@@ -67,7 +67,7 @@POSITION VARCHAR(100));ALTER TABLE "PUBLIC"."CUSTOMER" ADD CONSTRAINT PK_CUSTOMER PRIMARY KEY (ID);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE CUSTOMER(@@ -83,7 +83,7 @@FULL_NAME VARCHAR(10),POSITION VARCHAR(100));- changeType: 0+ changeType: 1want:- status: 2code: 601@@ -119,7 +119,7 @@);ALTER TABLE CUSTOMER DROP PRIMARY KEY(ID);ALTER TABLE ORDERING DROP PRIMARY KEY(ORDER_ID);- changeType: 0+ changeType: 1want:- status: 2code: 601diff --git a/backend/plugin/advisor/tidb/test/column_auto_increment_initial_value.yaml b/backend/plugin/advisor/tidb/test/column_auto_increment_initial_value.yamlindex a9169543af..96494b4470 100644--- a/backend/plugin/advisor/tidb/test/column_auto_increment_initial_value.yaml+++ b/backend/plugin/advisor/tidb/test/column_auto_increment_initial_value.yaml@@ -1,9 +1,9 @@- statement: CREATE TABLE t(a int)- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a int auto_increment) auto_increment = 20- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a int auto_increment) auto_increment = 2- changeType: 0+ changeType: 1want:- status: 2code: 416diff --git a/backend/plugin/advisor/tidb/test/column_auto_increment_must_integer.yaml b/backend/plugin/advisor/tidb/test/column_auto_increment_must_integer.yamlindex f3bedbb6e5..3ff4602c25 100644--- a/backend/plugin/advisor/tidb/test/column_auto_increment_must_integer.yaml+++ b/backend/plugin/advisor/tidb/test/column_auto_increment_must_integer.yaml@@ -1,7 +1,7 @@- statement: CREATE TABLE t(a INT AUTO_INCREMENT)- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a varchar(255) AUTO_INCREMENT)- changeType: 0+ changeType: 1want:- status: 2code: 410@@ -14,7 +14,7 @@- statement: |-CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN a varchar(255) AUTO_INCREMENT- changeType: 0+ changeType: 1want:- status: 2code: 410@@ -27,7 +27,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t MODIFY COLUMN a varchar(255) AUTO_INCREMENT- changeType: 0+ changeType: 1want:- status: 2code: 410@@ -40,7 +40,7 @@- statement: |-CREATE TABLE t(b int);ALTER TABLE t CHANGE COLUMN b a varchar(255) AUTO_INCREMENT- changeType: 0+ changeType: 1want:- status: 2code: 410diff --git a/backend/plugin/advisor/tidb/test/column_auto_increment_must_unsigned.yaml b/backend/plugin/advisor/tidb/test/column_auto_increment_must_unsigned.yamlindex f56195a171..a8bcd479ab 100644--- a/backend/plugin/advisor/tidb/test/column_auto_increment_must_unsigned.yaml+++ b/backend/plugin/advisor/tidb/test/column_auto_increment_must_unsigned.yaml@@ -1,7 +1,7 @@- statement: CREATE TABLE t(a INT UNSIGNED AUTO_INCREMENT)- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a INT AUTO_INCREMENT)- changeType: 0+ changeType: 1want:- status: 2code: 417@@ -14,7 +14,7 @@- statement: |-CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN a INT AUTO_INCREMENT- changeType: 0+ changeType: 1want:- status: 2code: 417@@ -27,7 +27,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t MODIFY COLUMN a INT AUTO_INCREMENT- changeType: 0+ changeType: 1want:- status: 2code: 417@@ -40,7 +40,7 @@- statement: |-CREATE TABLE t(b int);ALTER TABLE t CHANGE COLUMN b a INT AUTO_INCREMENT- changeType: 0+ changeType: 1want:- status: 2code: 417diff --git a/backend/plugin/advisor/tidb/test/column_comment.yaml b/backend/plugin/advisor/tidb/test/column_comment.yamlindex de70d01258..d1b36c9fcf 100644--- a/backend/plugin/advisor/tidb/test/column_comment.yaml+++ b/backend/plugin/advisor/tidb/test/column_comment.yaml@@ -1,11 +1,11 @@- statement: CREATE TABLE t(a int COMMENT 'comments')- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int COMMENT 'some comments',b int,c int)- changeType: 0+ changeType: 1want:- status: 2code: 1301@@ -34,7 +34,7 @@- statement: |-CREATE TABLE t(a int COMMENT 'comment');ALTER TABLE t ADD COLUMN b int- changeType: 0+ changeType: 1want:- status: 2code: 1032@@ -47,7 +47,7 @@- statement: |-CREATE TABLE t(a int COMMENT 'this is comment');ALTER TABLE t CHANGE COLUMN a b int- changeType: 0+ changeType: 1want:- status: 2code: 1301@@ -68,7 +68,7 @@- statement: |-CREATE TABLE t(b int COMMENT 'It is comment');ALTER TABLE t MODIFY COLUMN b int- changeType: 0+ changeType: 1want:- status: 2code: 1301@@ -89,7 +89,7 @@- statement: |-CREATE TABLE t(b int COMMENT 'It is COMMENT');ALTER TABLE t MODIFY COLUMN b int COMMENT 'abcdefghiakljhakljdsfalugelkhnabsdguelkadf'- changeType: 0+ changeType: 1want:- status: 2code: 1301diff --git a/backend/plugin/advisor/tidb/test/column_current_time_count_limit.yaml b/backend/plugin/advisor/tidb/test/column_current_time_count_limit.yamlindex e726aee5ab..6bc89ba408 100644--- a/backend/plugin/advisor/tidb/test/column_current_time_count_limit.yaml+++ b/backend/plugin/advisor/tidb/test/column_current_time_count_limit.yaml@@ -1,12 +1,12 @@- statement: CREATE TABLE t(a timestamp, b timestamp)- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a timestamp default now(),b timestamp default current_timestamp(),c timestamp default localtime)- changeType: 0+ changeType: 1want:- status: 2code: 418@@ -21,7 +21,7 @@a timestamp default now() on update localtime,b timestamp default current_timestamp() on update localtimestamp())- changeType: 0+ changeType: 1want:- status: 2code: 419@@ -34,7 +34,7 @@- statement: |-ALTER TABLE tech_book ADD COLUMN a timestamp default now() on update localtime;ALTER TABLE tech_book ADD COLUMN b timestamp default current_timestamp() on update localtimestamp();- changeType: 0+ changeType: 1want:- status: 2code: 419diff --git a/backend/plugin/advisor/tidb/test/column_disallow_change.yaml b/backend/plugin/advisor/tidb/test/column_disallow_change.yamlindex b2178545b9..db3a4c5f20 100644--- a/backend/plugin/advisor/tidb/test/column_disallow_change.yaml+++ b/backend/plugin/advisor/tidb/test/column_disallow_change.yaml@@ -1,11 +1,11 @@- statement: |-CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN a int- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(b int);ALTER TABLE t CHANGE COLUMN b a int- changeType: 0+ changeType: 1want:- status: 2code: 406diff --git a/backend/plugin/advisor/tidb/test/column_disallow_change_type.yaml b/backend/plugin/advisor/tidb/test/column_disallow_change_type.yamlindex c57b4c908e..fa38efa34f 100644--- a/backend/plugin/advisor/tidb/test/column_disallow_change_type.yaml+++ b/backend/plugin/advisor/tidb/test/column_disallow_change_type.yaml@@ -1,5 +1,5 @@- statement: ALTER TABLE tech_book MODIFY id INTEGER UNSIGNED- changeType: 0+ changeType: 1want:- status: 2code: 403@@ -10,9 +10,9 @@column: 0endposition: null- statement: ALTER TABLE tech_book MODIFY id int- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book MODIFY id bigint- changeType: 0+ changeType: 1want:- status: 2code: 403@@ -23,7 +23,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book CHANGE name uname varchar(20)- changeType: 0+ changeType: 1want:- status: 2code: 403diff --git a/backend/plugin/advisor/tidb/test/column_disallow_changing_order.yaml b/backend/plugin/advisor/tidb/test/column_disallow_changing_order.yamlindex e8bb7cd88c..ee9b26bf10 100644--- a/backend/plugin/advisor/tidb/test/column_disallow_changing_order.yaml+++ b/backend/plugin/advisor/tidb/test/column_disallow_changing_order.yaml@@ -1,7 +1,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t MODIFY COLUMN a int- changeType: 0+ changeType: 1want:- status: 2code: 407@@ -14,7 +14,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t MODIFY COLUMN a int FIRST- changeType: 0+ changeType: 1want:- status: 2code: 407@@ -27,7 +27,7 @@- statement: |-CREATE TABLE t(b int, a1 int);ALTER TABLE t CHANGE COLUMN a1 a int FIRST- changeType: 0+ changeType: 1want:- status: 2code: 407@@ -40,7 +40,7 @@- statement: |-CREATE TABLE t(a int, b int);ALTER TABLE t MODIFY COLUMN a int AFTER b- changeType: 0+ changeType: 1want:- status: 2code: 407@@ -53,7 +53,7 @@- statement: |-CREATE TABLE t(a1 int, b int);ALTER TABLE t CHANGE COLUMN a1 a int AFTER b- changeType: 0+ changeType: 1want:- status: 2code: 407diff --git a/backend/plugin/advisor/tidb/test/column_disallow_drop_in_index.yaml b/backend/plugin/advisor/tidb/test/column_disallow_drop_in_index.yamlindex 47d047eff7..26c8378eff 100644--- a/backend/plugin/advisor/tidb/test/column_disallow_drop_in_index.yaml+++ b/backend/plugin/advisor/tidb/test/column_disallow_drop_in_index.yaml@@ -1,11 +1,11 @@- statement: |-CREATE TABLE t(a int, b int, INDEX idx_a(a));ALTER TABLE t DROP COLUMN b- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int, b int, INDEX idx_b(b));ALTER TABLE t DROP COLUMN b- changeType: 0+ changeType: 1want:- status: 2code: 424@@ -18,7 +18,7 @@- statement: |-CREATE TABLE t(a int, c int, INDEX idx_ac(a,c));ALTER TABLE t DROP COLUMN c- changeType: 0+ changeType: 1want:- status: 2code: 424@@ -32,12 +32,12 @@CREATE TABLE t(a int, b int, INDEX idx_a(a));CREATE TABLE y(a int, b int);ALTER TABLE y DROP COLUMN a- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int,b int, c int, INDEX idx_ac(a,c));ALTER TABLE t DROP COLUMN a;ALTER TABLE t DROP COLUMN c- changeType: 0+ changeType: 1want:- status: 2code: 424diff --git a/backend/plugin/advisor/tidb/test/column_disallow_set_charset.yaml b/backend/plugin/advisor/tidb/test/column_disallow_set_charset.yamlindex dce69e6d5b..fe3a1f3029 100644--- a/backend/plugin/advisor/tidb/test/column_disallow_set_charset.yaml+++ b/backend/plugin/advisor/tidb/test/column_disallow_set_charset.yaml@@ -1,11 +1,11 @@- statement: |-CREATE TABLE dt_relation_temp(objto int);ALTER TABLE dt_relation_temp ADD COLUMN infos json null comment'关系信息点'AFTER`objto`;- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a varchar(20))- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a varchar(20) CHARSET ascii)- changeType: 0+ changeType: 1want:- status: 2code: 414@@ -16,7 +16,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book ADD COLUMN a varchar(20) CHARSET ascii- changeType: 0+ changeType: 1want:- status: 2code: 414@@ -27,7 +27,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book MODIFY COLUMN id varchar(20) CHARSET ascii- changeType: 0+ changeType: 1want:- status: 2code: 414@@ -38,7 +38,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book CHANGE COLUMN name name varchar(20) CHARSET ascii- changeType: 0+ changeType: 1want:- status: 2code: 414diff --git a/backend/plugin/advisor/tidb/test/column_maximum_character_length.yaml b/backend/plugin/advisor/tidb/test/column_maximum_character_length.yamlindex 00fcd38b93..fe0735ba3e 100644--- a/backend/plugin/advisor/tidb/test/column_maximum_character_length.yaml+++ b/backend/plugin/advisor/tidb/test/column_maximum_character_length.yaml@@ -1,9 +1,9 @@- statement: CREATE TABLE t(name char(20));- changeType: 0+ changeType: 1- statement: CREATE TABLE t(name varchar(225));- changeType: 0+ changeType: 1- statement: CREATE TABLE t(name char(225));- changeType: 0+ changeType: 1want:- status: 2code: 415@@ -14,7 +14,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book ADD COLUMN name_2 char(225)- changeType: 0+ changeType: 1want:- status: 2code: 415@@ -25,7 +25,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book CHANGE COLUMN name name char(225)- changeType: 0+ changeType: 1want:- status: 2code: 415@@ -36,7 +36,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book MODIFY COLUMN name char(225)- changeType: 0+ changeType: 1want:- status: 2code: 415diff --git a/backend/plugin/advisor/tidb/test/column_no_null.yaml b/backend/plugin/advisor/tidb/test/column_no_null.yamlindex bc4828b55c..366d046ab0 100644--- a/backend/plugin/advisor/tidb/test/column_no_null.yaml+++ b/backend/plugin/advisor/tidb/test/column_no_null.yaml@@ -2,7 +2,7 @@CREATE TABLE book(id int,name varchar(255))- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -21,7 +21,7 @@column: 0endposition: null- statement: CREATE TABLE book(id int PRIMARY KEY, name varchar(255))- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -32,7 +32,7 @@column: 0endposition: null- statement: CREATE TABLE book(id int NOT NULL, name varchar(255))- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -43,11 +43,11 @@column: 0endposition: null- statement: CREATE TABLE book(id int PRIMARY KEY, name varchar(255) NOT NULL)- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(a int NOT NULL);ALTER TABLE book ADD COLUMN (id int, name varchar(255) NOT NULL);- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -60,11 +60,11 @@- statement: |-CREATE TABLE book(a int NOT NULL);ALTER TABLE book ADD COLUMN (id int PRIMARY KEY, name varchar(255) NOT NULL);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(id int NOT NULL);ALTER TABLE book CHANGE COLUMN id name varchar(255);- changeType: 0+ changeType: 1want:- status: 2code: 402@@ -77,4 +77,4 @@- statement: |-CREATE TABLE book(id int NOT NULL);ALTER TABLE book CHANGE COLUMN id name varchar(255) NOT NULL;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/tidb/test/column_require_default.yaml b/backend/plugin/advisor/tidb/test/column_require_default.yamlindex 58bd8385eb..538558e463 100644--- a/backend/plugin/advisor/tidb/test/column_require_default.yaml+++ b/backend/plugin/advisor/tidb/test/column_require_default.yaml@@ -4,7 +4,7 @@b varchar(50) not null unique,primary key (a));- changeType: 0+ changeType: 1want:- status: 2code: 420@@ -15,13 +15,13 @@column: 0endposition: null- statement: CREATE TABLE t(a int primary key, b int default 1)- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int,b int default 1)- changeType: 0+ changeType: 1want:- status: 2code: 420@@ -35,7 +35,7 @@ALTER TABLE tech_book ADD COLUMN a BLOB;ALTER TABLE tech_book ADD COLUMN b timestamp;ALTER TABLE tech_book MODIFY COLUMN a varchar(220);- changeType: 0+ changeType: 1want:- status: 2code: 420diff --git a/backend/plugin/advisor/tidb/test/column_required.yaml b/backend/plugin/advisor/tidb/test/column_required.yamlindex 1c17f21e1e..e211e0f4f0 100644--- a/backend/plugin/advisor/tidb/test/column_required.yaml+++ b/backend/plugin/advisor/tidb/test/column_required.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE book(id int)- changeType: 0+ changeType: 1want:- status: 2code: 401@@ -16,7 +16,7 @@created_ts timestamp,updater_id int,updated_ts timestamp)- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(id int,@@ -25,7 +25,7 @@updater_id int,updated_ts timestamp);ALTER TABLE book RENAME COLUMN creator_id TO creator;- changeType: 0+ changeType: 1want:- status: 2code: 401@@ -43,7 +43,7 @@updater_id int,updated_ts timestamp);ALTER TABLE book RENAME COLUMN creator TO creator_id;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(id int,@@ -52,7 +52,7 @@updater_id int,updated_ts timestamp);ALTER TABLE book CHANGE COLUMN creator_id creator int;- changeType: 0+ changeType: 1want:- status: 2code: 401@@ -70,7 +70,7 @@updater_id int,updated_ts timestamp);ALTER TABLE book CHANGE COLUMN creator creator_id int;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(id int,@@ -79,7 +79,7 @@updater_id int,updated_ts timestamp);ALTER TABLE book DROP COLUMN creator_id;- changeType: 0+ changeType: 1want:- status: 2code: 401@@ -98,7 +98,7 @@updated_ts timestamp,content varchar(255));ALTER TABLE book DROP COLUMN content;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(id int,@@ -106,7 +106,7 @@created_ts timestamp,updated_ts timestamp);ALTER TABLE book ADD COLUMN content varchar(255);- changeType: 0+ changeType: 1want:- status: 2code: 401@@ -124,7 +124,7 @@updater_id int,updated_ts timestamp);ALTER TABLE book ADD COLUMN creator_id int;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(id int,@@ -135,7 +135,7 @@id int,created_ts timestamp,updated_ts timestamp)- changeType: 0+ changeType: 1want:- status: 2code: 401@@ -161,4 +161,4 @@updater_id int,updated_ts timestamp);DROP TABLE book;- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/tidb/test/column_set_default_for_not_null.yaml b/backend/plugin/advisor/tidb/test/column_set_default_for_not_null.yamlindex 66d90fe36f..4994916ce2 100644--- a/backend/plugin/advisor/tidb/test/column_set_default_for_not_null.yaml+++ b/backend/plugin/advisor/tidb/test/column_set_default_for_not_null.yaml@@ -2,17 +2,17 @@CREATE TABLE book(id int PRIMARY KEY DEFAULT 0)- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(id int PRIMARY KEY)- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(id int NOT NULL)- changeType: 0+ changeType: 1want:- status: 2code: 404@@ -27,15 +27,15 @@id int,PRIMARY KEY (id))- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(a int);ALTER TABLE book ADD COLUMN id int PRIMARY KEY- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(a int);ALTER TABLE book ADD COLUMN id int NOT NULL- changeType: 0+ changeType: 1want:- status: 2code: 404@@ -48,7 +48,7 @@- statement: |-CREATE TABLE book(id int);ALTER TABLE book MODIFY COLUMN id int NOT NULL- changeType: 0+ changeType: 1want:- status: 2code: 404@@ -61,15 +61,15 @@- statement: |-CREATE TABLE book(id int);ALTER TABLE book MODIFY COLUMN id int PRIMARY KEY- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(uid int);ALTER TABLE book CHANGE COLUMN uid id int PRIMARY KEY- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(uid int);ALTER TABLE book CHANGE COLUMN uid id int NOT NULL- changeType: 0+ changeType: 1want:- status: 2code: 404@@ -80,4 +80,4 @@column: 0endposition: null- statement: "\n\t\t\t\tCREATE TABLE book(uid int, id int);\n\t\t\t\tALTER TABLE book \n\t\t\t\t\tCHANGE COLUMN uid uid int NOT NULL DEFAULT 0,\n\t\t\t\t\tMODIFY COLUMN id int PRIMARY KEY DEFAULT 0,\n\t\t\t\t\tADD COLUMN name varchar(20) NOT NULL DEFAULT ''\n\t\t\t\t"- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/tidb/test/column_type_disallow_list.yaml b/backend/plugin/advisor/tidb/test/column_type_disallow_list.yamlindex 328db3b7b2..cee30d79a8 100644--- a/backend/plugin/advisor/tidb/test/column_type_disallow_list.yaml+++ b/backend/plugin/advisor/tidb/test/column_type_disallow_list.yaml@@ -1,7 +1,7 @@- statement: CREATE TABLE t(a int)- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a JSON, b BLOB, c TEXT)- changeType: 0+ changeType: 1want:- status: 2code: 411@@ -14,7 +14,7 @@- statement: |-CREATE TABLE t(d int);ALTER TABLE t add COLUMN (a JSON, b BLOB, c TEXT)- changeType: 0+ changeType: 1want:- status: 2code: 411@@ -27,7 +27,7 @@- statement: |-CREATE TABLE t(c int, b int);ALTER TABLE t CHANGE COLUMN c a JSON, MODIFY b BLOB- changeType: 0+ changeType: 1want:- status: 2code: 411diff --git a/backend/plugin/advisor/tidb/test/database_drop_empty_database.yaml b/backend/plugin/advisor/tidb/test/database_drop_empty_database.yamlindex 277a9b503e..f8397cd823 100644--- a/backend/plugin/advisor/tidb/test/database_drop_empty_database.yaml+++ b/backend/plugin/advisor/tidb/test/database_drop_empty_database.yaml@@ -1,5 +1,5 @@- statement: DROP DATABASE IF EXISTS test- changeType: 0+ changeType: 1want:- status: 2code: 701diff --git a/backend/plugin/advisor/tidb/test/index_key_number_limit.yaml b/backend/plugin/advisor/tidb/test/index_key_number_limit.yamlindex a66f1982b1..847f958cc4 100644--- a/backend/plugin/advisor/tidb/test/index_key_number_limit.yaml+++ b/backend/plugin/advisor/tidb/test/index_key_number_limit.yaml@@ -1,11 +1,11 @@- statement: CREATE TABLE t(a int, b int, primary key (a, b))- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int,b int,primary key pk (a, b, b, b, b, b, b))- changeType: 0+ changeType: 1want:- status: 2code: 802@@ -18,7 +18,7 @@- statement: |-CREATE TABLE t(a int, b int, c int, d int, e int, f int, g int);CREATE INDEX idx ON t(a, b, c, d, e, f, g)- changeType: 0+ changeType: 1want:- status: 2code: 802@@ -31,7 +31,7 @@- statement: |-CREATE TABLE t(a int, b int, c int, d int, e int, f int, g int);ALTER TABLE t ADD UNIQUE KEY uk (a, b, c, d, e, f, g)- changeType: 0+ changeType: 1want:- status: 2code: 802@@ -44,7 +44,7 @@- statement: |-CREATE TABLE t(a int, b int, c int, d int, e int, f int, g int);ALTER TABLE t ADD FOREIGN KEY uk (a, b, c, d, e, f, g) REFERENCES t1(a, b, c, d, e, f, g)- changeType: 0+ changeType: 1want:- status: 2code: 802diff --git a/backend/plugin/advisor/tidb/test/index_no_duplicate_column.yaml b/backend/plugin/advisor/tidb/test/index_no_duplicate_column.yamlindex 1360e2a543..5f303b5ac5 100644--- a/backend/plugin/advisor/tidb/test/index_no_duplicate_column.yaml+++ b/backend/plugin/advisor/tidb/test/index_no_duplicate_column.yaml@@ -1,10 +1,10 @@- statement: CREATE TABLE t (a int, PRIMARY KEY (a))- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t (a int,INDEX idx_a (a, a))- changeType: 0+ changeType: 1want:- status: 2code: 812@@ -17,7 +17,7 @@- statement: |-CREATE TABLE t(a int);CREATE INDEX idx_a on t(a, a)- changeType: 0+ changeType: 1want:- status: 2code: 812@@ -30,7 +30,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD INDEX idx_a (a, a)- changeType: 0+ changeType: 1want:- status: 2code: 812@@ -43,7 +43,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD PRIMARY KEY pk_a (a, a)- changeType: 0+ changeType: 1want:- status: 2code: 812@@ -56,7 +56,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD UNIQUE KEY uk_a (a, a)- changeType: 0+ changeType: 1want:- status: 2code: 812@@ -69,7 +69,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD FOREIGN KEY fk_a (a, a) REFERENCES t1(a, b)- changeType: 0+ changeType: 1want:- status: 2code: 812diff --git a/backend/plugin/advisor/tidb/test/index_pk_type_limit.yaml b/backend/plugin/advisor/tidb/test/index_pk_type_limit.yamlindex 2326318fed..1b9e798752 100644--- a/backend/plugin/advisor/tidb/test/index_pk_type_limit.yaml+++ b/backend/plugin/advisor/tidb/test/index_pk_type_limit.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE t(id VARCHAR(5) PRIMARY KEY)- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -10,9 +10,9 @@column: 0endposition: null- statement: CREATE TABLE t(id INT PRIMARY KEY)- changeType: 0+ changeType: 1- statement: CREATE TABLE t(id VARCHAR(5), PRIMARY KEY(id))- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -23,7 +23,7 @@column: 0endposition: null- statement: CREATE TABLE t(id INT, id2 VARCHAR(5), id3 VARCHAR(5), PRIMARY KEY(id, id2, id3))- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -42,13 +42,13 @@column: 0endposition: null- statement: CREATE TABLE t(id INT, id2 BIGINT, PRIMARY KEY(id, id2))- changeType: 0+ changeType: 1- statement: CREATE TABLE t(id INT, PRIMARY KEY(id))- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id VARCHAR(5) PRIMARY KEY- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -61,11 +61,11 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id INT PRIMARY KEY- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id VARCHAR(5), ADD PRIMARY KEY (id)- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -78,7 +78,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id INT, ADD COLUMN id2 VARCHAR(5), ADD COLUMN id3 VARCHAR(5), ADD PRIMARY KEY (id, id2, id3)- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -99,15 +99,15 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id INT, ADD COLUMN id2 BIGINT, ADD PRIMARY KEY (id, id2)- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id BIGINT, ADD PRIMARY KEY (id)- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id VARCHAR(5));ALTER TABLE t ADD PRIMARY KEY(id);- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -120,7 +120,7 @@- statement: |-CREATE TABLE t(id INT, id2 VARCHAR(5), id3 VARCHAR(5));ALTER TABLE t ADD PRIMARY KEY(id, id2, id3);- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -141,15 +141,15 @@- statement: |-CREATE TABLE t(id INT, id2 BIGINT);ALTER TABLE t ADD PRIMARY KEY(id, id2);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id BIGINT);ALTER TABLE t ADD PRIMARY KEY(id);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id int);ALTER TABLE t MODIFY COLUMN id VARCHAR(5) PRIMARY KEY;- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -162,11 +162,11 @@- statement: |-CREATE TABLE t(id int);ALTER TABLE t MODIFY COLUMN id INT(5) PRIMARY KEY;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id int);ALTER TABLE t CHANGE COLUMN id id2 VARCHAR(5) PRIMARY KEY- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -179,4 +179,4 @@- statement: |-CREATE TABLE t(id int);ALTER TABLE t CHANGE COLUMN id id2 INT(5) PRIMARY KEY- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/tidb/test/index_primary_key_type_allowlist.yaml b/backend/plugin/advisor/tidb/test/index_primary_key_type_allowlist.yamlindex ce83e660a6..37d4df5888 100644--- a/backend/plugin/advisor/tidb/test/index_primary_key_type_allowlist.yaml+++ b/backend/plugin/advisor/tidb/test/index_primary_key_type_allowlist.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE t(id VARCHAR(5) PRIMARY KEY)- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -10,9 +10,9 @@column: 0endposition: null- statement: CREATE TABLE t(id INT PRIMARY KEY)- changeType: 0+ changeType: 1- statement: CREATE TABLE t(id VARCHAR(5), PRIMARY KEY(id))- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -23,7 +23,7 @@column: 0endposition: null- statement: CREATE TABLE t(id INT, id2 VARCHAR(5), id3 VARCHAR(5), PRIMARY KEY(id, id2, id3))- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -42,13 +42,13 @@column: 0endposition: null- statement: CREATE TABLE t(id INT, id2 BIGINT, PRIMARY KEY(id, id2))- changeType: 0+ changeType: 1- statement: CREATE TABLE t(id INT, PRIMARY KEY(id))- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id VARCHAR(5) PRIMARY KEY- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -61,11 +61,11 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id INT PRIMARY KEY- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id VARCHAR(5), ADD PRIMARY KEY (id)- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -78,7 +78,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id INT, ADD COLUMN id2 VARCHAR(5), ADD COLUMN id3 VARCHAR(5), ADD PRIMARY KEY (id, id2, id3)- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -99,15 +99,15 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id INT, ADD COLUMN id2 BIGINT, ADD PRIMARY KEY (id, id2)- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id BIGINT, ADD PRIMARY KEY (id)- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id VARCHAR(5));ALTER TABLE t ADD PRIMARY KEY(id);- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -120,7 +120,7 @@- statement: |-CREATE TABLE t(id INT, id2 VARCHAR(5), id3 VARCHAR(5));ALTER TABLE t ADD PRIMARY KEY(id, id2, id3);- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -141,15 +141,15 @@- statement: |-CREATE TABLE t(id INT, id2 BIGINT);ALTER TABLE t ADD PRIMARY KEY(id, id2);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id BIGINT);ALTER TABLE t ADD PRIMARY KEY(id);- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id int);ALTER TABLE t MODIFY COLUMN id VARCHAR(5) PRIMARY KEY;- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -162,11 +162,11 @@- statement: |-CREATE TABLE t(id int);ALTER TABLE t MODIFY COLUMN id INT(5) PRIMARY KEY;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id int);ALTER TABLE t CHANGE COLUMN id id2 VARCHAR(5) PRIMARY KEY- changeType: 0+ changeType: 1want:- status: 2code: 803@@ -179,4 +179,4 @@- statement: |-CREATE TABLE t(id int);ALTER TABLE t CHANGE COLUMN id id2 INT(5) PRIMARY KEY- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/tidb/test/index_total_number_limit.yaml b/backend/plugin/advisor/tidb/test/index_total_number_limit.yamlindex 9ffd2163e9..4d45969a60 100644--- a/backend/plugin/advisor/tidb/test/index_total_number_limit.yaml+++ b/backend/plugin/advisor/tidb/test/index_total_number_limit.yaml@@ -1,14 +1,14 @@- statement: CREATE TABLE t(a int, b int, c int, unique key(a, b, c))- changeType: 0+ changeType: 1- statement: CREATE INDEX idx_id_name on tech_book(id, name)- changeType: 0+ changeType: 1- statement: |-CREATE INDEX idx_id_name_1 on tech_book(id, name);CREATE INDEX idx_id_name_2 on tech_book(id, name);CREATE INDEX idx_id_name_3 on tech_book(id, name);CREATE INDEX idx_id_name_4 on tech_book(id, name);CREATE INDEX idx_id_name_5 on tech_book(id, name);- changeType: 0+ changeType: 1want:- status: 2code: 813@@ -25,7 +25,7 @@CREATE INDEX idx_a_b_3 on t(a, b);CREATE INDEX idx_a_b_4 on t(a, b);CREATE INDEX idx_a_b_5 on t(a, b);- changeType: 0+ changeType: 1want:- status: 2code: 813@@ -45,7 +45,7 @@INDEX idx_a_b_3 (a, b),INDEX idx_a_b_4 (a, b),INDEX idx_a_b_5 (a, b));- changeType: 0+ changeType: 1want:- status: 2code: 813diff --git a/backend/plugin/advisor/tidb/test/index_type_no_blob.yaml b/backend/plugin/advisor/tidb/test/index_type_no_blob.yamlindex f31a963a31..e2886c2559 100644--- a/backend/plugin/advisor/tidb/test/index_type_no_blob.yaml+++ b/backend/plugin/advisor/tidb/test/index_type_no_blob.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE t(b BLOB, PRIMARY KEY(b(10)))- changeType: 0+ changeType: 1want:- status: 2code: 804@@ -10,7 +10,7 @@column: 0endposition: null- statement: CREATE TABLE t(b BLOB, mb MEDIUMBLOB, lb LONGBLOB, id INT, PRIMARY KEY(b(1), mb(2), lb(3), id))- changeType: 0+ changeType: 1want:- status: 2code: 804@@ -37,7 +37,7 @@column: 0endposition: null- statement: CREATE TABLE t(b BLOB, mb MEDIUMBLOB, lb LONGBLOB, id INT, UNIQUE INDEX(b(1), mb(2), lb(3), id))- changeType: 0+ changeType: 1want:- status: 2code: 804@@ -64,7 +64,7 @@column: 0endposition: null- statement: CREATE TABLE t(b BLOB, mb MEDIUMBLOB, lb LONGBLOB, id iNT, INDEX(b(1), mb(2), lb(3), id))- changeType: 0+ changeType: 1want:- status: 2code: 804@@ -91,11 +91,11 @@column: 0endposition: null- statement: CREATE TABLE t(id INT, PRIMARY KEY(id))- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN b BLOB, ADD COLUMN id INT, ADD PRIMARY KEY(b(1), id)- changeType: 0+ changeType: 1want:- status: 2code: 804@@ -108,7 +108,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN b BLOB, ADD COLUMN mb MEDIUMBLOB, ADD COLUMN lb LONGBLOB, ADD COLUMN id INT, ADD UNIQUE INDEX(b(1), mb(2), lb(3), id)- changeType: 0+ changeType: 1want:- status: 2code: 804@@ -137,7 +137,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN b BLOB, ADD COLUMN mb MEDIUMBLOB, ADD COLUMN lb LONGBLOB, ADD COLUMN id INT, ADD INDEX(b(1), mb(2), lb(3), id)- changeType: 0+ changeType: 1want:- status: 2code: 804@@ -166,14 +166,14 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN b BLOB, ADD COLUMN mb MEDIUMBLOB, ADD COLUMN lb LONGBLOB, ADD COLUMN id INT, ADD INDEX(id)- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(b blob, mb mediumblob, lb longblob, id int);CREATE INDEX idx_b ON t(b(5));CREATE INDEX idx_mb ON t(mb(5));CREATE INDEX idx_lb ON t(lb(5));CREATE INDEX idx_id ON t(id);- changeType: 0+ changeType: 1want:- status: 2code: 804@@ -202,4 +202,4 @@- statement: |-CREATE TABLE t(b blob, mb mediumblob, lb longblob, id int);CREATE INDEX idx_id ON t(id);- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/tidb/test/naming_column.yaml b/backend/plugin/advisor/tidb/test/naming_column.yamlindex 8fb3d5d32f..3c72d6ef8d 100644--- a/backend/plugin/advisor/tidb/test/naming_column.yaml+++ b/backend/plugin/advisor/tidb/test/naming_column.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE book(id int, creatorId int)- changeType: 0+ changeType: 1want:- status: 2code: 302@@ -10,7 +10,7 @@column: 0endposition: null- statement: CREATE TABLE book(id int, gbhzmtchhsjzyrhdroxmyouwloxqezowdvhcbqalqcgqhfbjnvmhwrbggezmzeusx int)- changeType: 0+ changeType: 1want:- status: 2code: 302@@ -21,11 +21,11 @@column: 0endposition: null- statement: CREATE TABLE book(id int, creator_id int)- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(id int, creator_id int);ALTER TABLE book RENAME COLUMN creator_id TO creatorId- changeType: 0+ changeType: 1want:- status: 2code: 302@@ -36,7 +36,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book RENAME COLUMN id TO creator_id;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(id int,@@ -45,7 +45,7 @@updater_id int,updated_ts timestamp);ALTER TABLE book CHANGE COLUMN creator_id creatorId int;- changeType: 0+ changeType: 1want:- status: 2code: 302@@ -56,9 +56,9 @@column: 0endposition: null- statement: ALTER TABLE tech_book CHANGE COLUMN id creator_id int;- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book DROP COLUMN id;- changeType: 0+ changeType: 1- statement: |-CREATE TABLE book(id int,@@ -66,7 +66,7 @@created_ts timestamp,updated_ts timestamp);ALTER TABLE book ADD COLUMN contentString varchar(255);- changeType: 0+ changeType: 1want:- status: 2code: 302@@ -86,7 +86,7 @@id int,createdTs timestamp,updatedTs timestamp);- changeType: 0+ changeType: 1want:- status: 2code: 302diff --git a/backend/plugin/advisor/tidb/test/naming_column_auto_increment.yaml b/backend/plugin/advisor/tidb/test/naming_column_auto_increment.yamlindex 7f8ecccc9e..5458695bc8 100644--- a/backend/plugin/advisor/tidb/test/naming_column_auto_increment.yaml+++ b/backend/plugin/advisor/tidb/test/naming_column_auto_increment.yaml@@ -1,7 +1,7 @@- statement: CREATE TABLE book(id int AUTO_INCREMENT)- changeType: 0+ changeType: 1- statement: CREATE TABLE book(a int AUTO_INCREMENT)- changeType: 0+ changeType: 1want:- status: 2code: 307@@ -12,7 +12,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book ADD COLUMN a int AUTO_INCREMENT- changeType: 0+ changeType: 1want:- status: 2code: 307@@ -23,7 +23,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book CHANGE COLUMN id a int AUTO_INCREMENT- changeType: 0+ changeType: 1want:- status: 2code: 307@@ -34,7 +34,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book MODIFY COLUMN name int AUTO_INCREMENT- changeType: 0+ changeType: 1want:- status: 2code: 307diff --git a/backend/plugin/advisor/tidb/test/naming_index_fk.yaml b/backend/plugin/advisor/tidb/test/naming_index_fk.yamlindex 75ceacbf22..bc343b76bc 100644--- a/backend/plugin/advisor/tidb/test/naming_index_fk.yaml+++ b/backend/plugin/advisor/tidb/test/naming_index_fk.yaml@@ -1,7 +1,7 @@- statement: ALTER TABLE tech_book ADD CONSTRAINT fk_tech_book_author_id_author_id FOREIGN KEY (author_id) REFERENCES author (id)- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book ADD CONSTRAINT fk_author_id FOREIGN KEY (author_id) REFERENCES author (id)- changeType: 0+ changeType: 1want:- status: 2code: 305@@ -12,7 +12,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book ADD CONSTRAINT rvemempmcmmhutaskvcidmwaldtfjdgmcpkhmibtadfydtkexpuzczrrneucthfwk FOREIGN KEY (author_id) REFERENCES author (id)- changeType: 0+ changeType: 1want:- status: 2code: 305@@ -31,11 +31,11 @@column: 0endposition: null- statement: CREATE TABLE book(id INT, author_id INT, FOREIGN KEY fk_book_author_id_author_id (author_id) REFERENCES author (id))- changeType: 0+ changeType: 1- statement: CREATE TABLE book(id INT, author_id INT, FOREIGN KEY (author_id) REFERENCES author (id))- changeType: 0+ changeType: 1- statement: CREATE TABLE book(id INT, author_id INT, FOREIGN KEY fk_book_author_id (author_id) REFERENCES author (id))- changeType: 0+ changeType: 1want:- status: 2code: 305diff --git a/backend/plugin/advisor/tidb/test/naming_index_idx.yaml b/backend/plugin/advisor/tidb/test/naming_index_idx.yamlindex d06903cf49..eebe5b3520 100644--- a/backend/plugin/advisor/tidb/test/naming_index_idx.yaml+++ b/backend/plugin/advisor/tidb/test/naming_index_idx.yaml@@ -1,7 +1,7 @@- statement: CREATE INDEX idx_tech_book_id_name ON tech_book(id, name)- changeType: 0+ changeType: 1- statement: CREATE INDEX tech_book_id_name ON tech_book(id, name)- changeType: 0+ changeType: 1want:- status: 2code: 303@@ -12,7 +12,7 @@column: 0endposition: null- statement: CREATE INDEX afvjwsgrbgqzjfrkmbcoxzstznuypasijbbcdykoboredqovetzfcmmqliaelyavw ON tech_book(id, name)- changeType: 0+ changeType: 1want:- status: 2code: 303@@ -31,9 +31,9 @@column: 0endposition: null- statement: ALTER TABLE tech_book RENAME INDEX old_index TO idx_tech_book_id_name- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book RENAME INDEX old_index TO idx_tech_book- changeType: 0+ changeType: 1want:- status: 2code: 303@@ -44,9 +44,9 @@column: 0endposition: null- statement: ALTER TABLE tech_book ADD INDEX idx_tech_book_id_name (id, name)- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book ADD INDEX tech_book_id_name (id, name)- changeType: 0+ changeType: 1want:- status: 2code: 303@@ -57,6 +57,6 @@column: 0endposition: null- statement: CREATE TABLE tech_book_copy(id INT PRIMARY KEY, name VARCHAR(20), INDEX idx_tech_book_copy_name (name))- changeType: 0+ changeType: 1- statement: CREATE TABLE tech_book_copy(id INT PRIMARY KEY, name VARCHAR(20), INDEX (name))- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/tidb/test/naming_index_uk.yaml b/backend/plugin/advisor/tidb/test/naming_index_uk.yamlindex 11e6bb394c..9f14e8c53b 100644--- a/backend/plugin/advisor/tidb/test/naming_index_uk.yaml+++ b/backend/plugin/advisor/tidb/test/naming_index_uk.yaml@@ -1,7 +1,7 @@- statement: CREATE UNIQUE INDEX uk_tech_book_id_name ON tech_book(id, name)- changeType: 0+ changeType: 1- statement: CREATE UNIQUE INDEX tech_book_id_name ON tech_book(id, name)- changeType: 0+ changeType: 1want:- status: 2code: 304@@ -12,7 +12,7 @@column: 0endposition: null- statement: CREATE UNIQUE INDEX qtzmquwvlnttctfluoouxelxeliltcfzzstrtyocogwwyiyrflmrkbhbfasynlacy ON tech_book(id, name)- changeType: 0+ changeType: 1want:- status: 2code: 304@@ -31,9 +31,9 @@column: 0endposition: null- statement: ALTER TABLE tech_book ADD UNIQUE uk_tech_book_id_name (id, name)- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book ADD UNIQUE tech_book_id_name (id, name)- changeType: 0+ changeType: 1want:- status: 2code: 304@@ -44,9 +44,9 @@column: 0endposition: null- statement: ALTER TABLE tech_book RENAME INDEX old_uk TO uk_tech_book_id_name- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book RENAME INDEX old_uk TO uk_tech_book- changeType: 0+ changeType: 1want:- status: 2code: 304@@ -57,8 +57,8 @@column: 0endposition: null- statement: CREATE TABLE book(id INT PRIMARY KEY, name VARCHAR(20), UNIQUE INDEX uk_book_name (name))- changeType: 0+ changeType: 1- statement: CREATE TABLE book(id INT PRIMARY KEY, name VARCHAR(20), UNIQUE KEY (name))- changeType: 0+ changeType: 1- statement: CREATE TABLE book(id INT PRIMARY KEY, name VARCHAR(20), UNIQUE INDEX (name))- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/tidb/test/naming_table.yaml b/backend/plugin/advisor/tidb/test/naming_table.yamlindex b46fa977dd..461693e561 100644--- a/backend/plugin/advisor/tidb/test/naming_table.yaml+++ b/backend/plugin/advisor/tidb/test/naming_table.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE techBook(id int, name varchar(255))- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -10,9 +10,9 @@column: 0endposition: null- statement: CREATE TABLE tech_book_copy(id int, name varchar(255))- changeType: 0+ changeType: 1- statement: CREATE TABLE cjnubexocfhqoogdmihudyahmmghviqkzvpixnwvxtxumvuannpwdcbtsgwrvzpde(id int, name varchar(255))- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -23,7 +23,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book RENAME TO TechBook- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -34,9 +34,9 @@column: 0endposition: null- statement: ALTER TABLE tech_book RENAME TO tech_book_copy- changeType: 0+ changeType: 1- statement: RENAME TABLE tech_book TO tech_book_copy, tech_book_copy TO LiteraryBook- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -47,7 +47,7 @@column: 0endposition: null- statement: CREATE TABLE literary_book(a int);RENAME TABLE tech_book TO TechBook, literary_book TO LiteraryBook- changeType: 0+ changeType: 1want:- status: 2code: 301@@ -66,4 +66,4 @@column: 0endposition: null- statement: CREATE TABLE literary_book(a int);RENAME TABLE tech_book TO tech_book_copy, literary_book TO literary_book_copy- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/tidb/test/schema_backward_compatibility.yaml b/backend/plugin/advisor/tidb/test/schema_backward_compatibility.yamlindex ecf47a54da..eea8404c57 100644--- a/backend/plugin/advisor/tidb/test/schema_backward_compatibility.yaml+++ b/backend/plugin/advisor/tidb/test/schema_backward_compatibility.yaml@@ -1,5 +1,5 @@- statement: ALTER TABLE tech_book CHANGE name f2 TEXT- changeType: 0+ changeType: 1want:- status: 2code: 111@@ -10,7 +10,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book MODIFY name TEXT- changeType: 0+ changeType: 1want:- status: 2code: 111@@ -21,7 +21,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book MODIFY name TEXT NULL- changeType: 0+ changeType: 1want:- status: 2code: 111@@ -32,7 +32,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book MODIFY name TEXT NOT NULL- changeType: 0+ changeType: 1want:- status: 2code: 111@@ -43,7 +43,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book MODIFY name TEXT COMMENT 'bla'- changeType: 0+ changeType: 1want:- status: 2code: 111diff --git a/backend/plugin/advisor/tidb/test/statement_disallow_commit.yaml b/backend/plugin/advisor/tidb/test/statement_disallow_commit.yamlindex 10735b4545..66ce58abf6 100644--- a/backend/plugin/advisor/tidb/test/statement_disallow_commit.yaml+++ b/backend/plugin/advisor/tidb/test/statement_disallow_commit.yaml@@ -2,7 +2,7 @@START TRANSACTION;CREATE TABLE techBook(id int, name varchar(255));COMMIT;- changeType: 0+ changeType: 1want:- status: 2code: 206@@ -20,7 +20,7 @@START TRANSACTION;INSERT INTO techBook(id, name) VALUES(1, "book");COMMIT;- changeType: 0+ changeType: 1want:- status: 2code: 206diff --git a/backend/plugin/advisor/tidb/test/statement_disallow_limit.yaml b/backend/plugin/advisor/tidb/test/statement_disallow_limit.yamlindex f7b2048fd8..066b9b5e1d 100644--- a/backend/plugin/advisor/tidb/test/statement_disallow_limit.yaml+++ b/backend/plugin/advisor/tidb/test/statement_disallow_limit.yaml@@ -1,7 +1,7 @@- statement: ""- changeType: 0+ changeType: 1- statement: INSERT INTO tech_book SELECT * FROM tech_book LIMIT 1- changeType: 0+ changeType: 1want:- status: 2code: 1103@@ -12,7 +12,7 @@column: 0endposition: null- statement: INSERT INTO tech_book SELECT * FROM tech_book UNION SELECT * FROM tech_book LIMIT 1- changeType: 0+ changeType: 1want:- status: 2code: 1103@@ -23,7 +23,7 @@column: 0endposition: null- statement: UPDATE tech_book SET name = 'my name' LIMIT 10- changeType: 0+ changeType: 1want:- status: 2code: 1102@@ -34,7 +34,7 @@column: 0endposition: null- statement: DELETE FROM tech_book LIMIT 10- changeType: 0+ changeType: 1want:- status: 2code: 1106diff --git a/backend/plugin/advisor/tidb/test/statement_disallow_order_by.yaml b/backend/plugin/advisor/tidb/test/statement_disallow_order_by.yamlindex cbeffdb91e..4832282e40 100644--- a/backend/plugin/advisor/tidb/test/statement_disallow_order_by.yaml+++ b/backend/plugin/advisor/tidb/test/statement_disallow_order_by.yaml@@ -1,7 +1,7 @@- statement: INSERT INTO tech_book values(1, 'a')- changeType: 0+ changeType: 1- statement: UPDATE tech_book SET name = 'my name' ORDER BY id- changeType: 0+ changeType: 1want:- status: 2code: 1104@@ -12,7 +12,7 @@column: 0endposition: null- statement: DELETE FROM tech_book ORDER BY id- changeType: 0+ changeType: 1want:- status: 2code: 1105diff --git a/backend/plugin/advisor/tidb/test/statement_dml_dry_run.yaml b/backend/plugin/advisor/tidb/test/statement_dml_dry_run.yamlindex 68885e98ba..291d9d0089 100644--- a/backend/plugin/advisor/tidb/test/statement_dml_dry_run.yaml+++ b/backend/plugin/advisor/tidb/test/statement_dml_dry_run.yaml@@ -1,4 +1,4 @@- statement: INSERT INTO tech_book values(1, 'a')- changeType: 0+ changeType: 1- statement: DELETE FROM tech_book- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/tidb/test/statement_insert_disallow_order_by_rand.yaml b/backend/plugin/advisor/tidb/test/statement_insert_disallow_order_by_rand.yamlindex 2a9dfca09a..7a07c5a492 100644--- a/backend/plugin/advisor/tidb/test/statement_insert_disallow_order_by_rand.yaml+++ b/backend/plugin/advisor/tidb/test/statement_insert_disallow_order_by_rand.yaml@@ -1,7 +1,7 @@- statement: INSERT INTO tech_book VALUES(1, "a")- changeType: 0+ changeType: 1- statement: INSERT INTO tech_book SELECT * FROM tech_book ORDER BY rand()- changeType: 0+ changeType: 1want:- status: 2code: 1108diff --git a/backend/plugin/advisor/tidb/test/statement_insert_must_specify_column.yaml b/backend/plugin/advisor/tidb/test/statement_insert_must_specify_column.yamlindex 749b0c4482..797bb0af01 100644--- a/backend/plugin/advisor/tidb/test/statement_insert_must_specify_column.yaml+++ b/backend/plugin/advisor/tidb/test/statement_insert_must_specify_column.yaml@@ -1,7 +1,7 @@- statement: INSERT INTO tech_book(id, name) VALUES (1, '1')- changeType: 0+ changeType: 1- statement: INSERT INTO tech_book VALUES (1, '1')- changeType: 0+ changeType: 1want:- status: 2code: 1107diff --git a/backend/plugin/advisor/tidb/test/statement_maximum_limit_value.yaml b/backend/plugin/advisor/tidb/test/statement_maximum_limit_value.yamlindex 2a5837919e..7c53075e8d 100644--- a/backend/plugin/advisor/tidb/test/statement_maximum_limit_value.yaml+++ b/backend/plugin/advisor/tidb/test/statement_maximum_limit_value.yaml@@ -1,6 +1,6 @@- statement: |SELECT * FROM employee LIMIT 1000000;- changeType: 0+ changeType: 1want:- status: 2code: 222diff --git a/backend/plugin/advisor/tidb/test/statement_merge_alter_table.yaml b/backend/plugin/advisor/tidb/test/statement_merge_alter_table.yamlindex 08a0750804..f87fe66db0 100644--- a/backend/plugin/advisor/tidb/test/statement_merge_alter_table.yaml+++ b/backend/plugin/advisor/tidb/test/statement_merge_alter_table.yaml@@ -1,9 +1,9 @@- statement: ALTER TABLE tech_book ADD COLUMN a int- changeType: 0+ changeType: 1- statement: |-ALTER TABLE tech_book ADD COLUMN a int;ALTER TABLE tech_book ADD COLUMN b int;- changeType: 0+ changeType: 1want:- status: 2code: 207@@ -18,7 +18,7 @@ALTER TABLE tech_book ADD COLUMN a int;ALTER TABLE t ADD COLUMN b int;ALTER TABLE tech_book ADD COLUMN b int;- changeType: 0+ changeType: 1want:- status: 2code: 207@@ -41,7 +41,7 @@ALTER TABLE tech_book ADD COLUMN a int;ALTER TABLE tech_book ADD COLUMN b int;ALTER TABLE t ADD COLUMN b int;- changeType: 0+ changeType: 1want:- status: 2code: 207diff --git a/backend/plugin/advisor/tidb/test/statement_select_no_select_all.yaml b/backend/plugin/advisor/tidb/test/statement_select_no_select_all.yamlindex 97c0fb904a..6eb19e5dd7 100644--- a/backend/plugin/advisor/tidb/test/statement_select_no_select_all.yaml+++ b/backend/plugin/advisor/tidb/test/statement_select_no_select_all.yaml@@ -1,5 +1,5 @@- statement: SELECT * FROM t- changeType: 0+ changeType: 1want:- status: 2code: 203@@ -10,9 +10,9 @@column: 0endposition: null- statement: SELECT a, b FROM t- changeType: 0+ changeType: 1- statement: SELECT a, b FROM (SELECT * from t1 JOIN t2) t- changeType: 0+ changeType: 1want:- status: 2code: 203diff --git a/backend/plugin/advisor/tidb/test/statement_where_no_leading_wildcard_like.yaml b/backend/plugin/advisor/tidb/test/statement_where_no_leading_wildcard_like.yamlindex 241f8c6b50..6df20f31e3 100644--- a/backend/plugin/advisor/tidb/test/statement_where_no_leading_wildcard_like.yaml+++ b/backend/plugin/advisor/tidb/test/statement_where_no_leading_wildcard_like.yaml@@ -1,7 +1,7 @@- statement: SELECT * FROM t WHERE a LIKE 'abc%'- changeType: 0+ changeType: 1- statement: SELECT * FROM t WHERE a LIKE '%abc'- changeType: 0+ changeType: 1want:- status: 2code: 204@@ -12,7 +12,7 @@column: 0endposition: null- statement: SELECT * FROM t WHERE a LIKE 'abc' OR a LIKE '%abc'- changeType: 0+ changeType: 1want:- status: 2code: 204@@ -23,7 +23,7 @@column: 0endposition: null- statement: SELECT * FROM t WHERE a LIKE '%acc' OR a LIKE '%abc'- changeType: 0+ changeType: 1want:- status: 2code: 204@@ -34,7 +34,7 @@column: 0endposition: null- statement: SELECT * FROM (SELECT * FROM t WHERE a LIKE '%acc' OR a LIKE '%abc') t1- changeType: 0+ changeType: 1want:- status: 2code: 204diff --git a/backend/plugin/advisor/tidb/test/statement_where_require_select.yaml b/backend/plugin/advisor/tidb/test/statement_where_require_select.yamlindex 18ae66df33..19f9b761e2 100644--- a/backend/plugin/advisor/tidb/test/statement_where_require_select.yaml+++ b/backend/plugin/advisor/tidb/test/statement_where_require_select.yaml@@ -1,5 +1,5 @@- statement: SELECT id FROM tech_book- changeType: 0+ changeType: 1want:- status: 2code: 202@@ -10,9 +10,9 @@column: 0endposition: null- statement: SELECT id FROM tech_book WHERE id > 0- changeType: 0+ changeType: 1- statement: SELECT id FROM tech_book WHERE id > (SELECT max(id) FROM tech_book)- changeType: 0+ changeType: 1want:- status: 2code: 202@@ -23,4 +23,4 @@column: 0endposition: null- statement: SELECT CURDATE()- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/tidb/test/statement_where_require_update_delete.yaml b/backend/plugin/advisor/tidb/test/statement_where_require_update_delete.yamlindex 261ff85760..d3a912fc86 100644--- a/backend/plugin/advisor/tidb/test/statement_where_require_update_delete.yaml+++ b/backend/plugin/advisor/tidb/test/statement_where_require_update_delete.yaml@@ -1,5 +1,5 @@- statement: DELETE FROM tech_book- changeType: 0+ changeType: 1want:- status: 2code: 202@@ -10,7 +10,7 @@column: 0endposition: null- statement: UPDATE tech_book SET id = 1- changeType: 0+ changeType: 1want:- status: 2code: 202@@ -21,6 +21,6 @@column: 0endposition: null- statement: DELETE FROM tech_book WHERE id > 0- changeType: 0+ changeType: 1- statement: UPDATE tech_book SET id = 1 WHERE id > 10- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/tidb/test/system_charset_allowlist.yaml b/backend/plugin/advisor/tidb/test/system_charset_allowlist.yamlindex c0d2a463ca..8370aff7a7 100644--- a/backend/plugin/advisor/tidb/test/system_charset_allowlist.yaml+++ b/backend/plugin/advisor/tidb/test/system_charset_allowlist.yaml@@ -1,9 +1,9 @@- statement: CREATE TABLE t(a int) CHARSET utf8mb4- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a varchar(255))- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a int) CHARSET ascii- changeType: 0+ changeType: 1want:- status: 2code: 1001@@ -16,7 +16,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t CHARSET ascii- changeType: 0+ changeType: 1want:- status: 2code: 1001@@ -27,7 +27,7 @@column: 0endposition: null- statement: ALTER DATABASE test CHARSET ascii- changeType: 0+ changeType: 1want:- status: 2code: 1001@@ -38,7 +38,7 @@column: 0endposition: null- statement: CREATE TABLE t(a varchar(255) CHARSET ascii)- changeType: 0+ changeType: 1want:- status: 2code: 1001@@ -51,7 +51,7 @@- statement: |-CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN a varchar(255) CHARSET ascii- changeType: 0+ changeType: 1want:- status: 2code: 1001@@ -64,7 +64,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t MODIFY COLUMN a varchar(255) CHARSET ascii- changeType: 0+ changeType: 1want:- status: 2code: 1001@@ -77,7 +77,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t CHANGE COLUMN a a varchar(255) CHARSET ascii- changeType: 0+ changeType: 1want:- status: 2code: 1001@@ -88,4 +88,4 @@column: 0endposition: null- statement: /* this is a comment */- changeType: 0+ changeType: 1diff --git a/backend/plugin/advisor/tidb/test/system_collation_allowlist.yaml b/backend/plugin/advisor/tidb/test/system_collation_allowlist.yamlindex 4bdac88d0c..60e0ab78cb 100644--- a/backend/plugin/advisor/tidb/test/system_collation_allowlist.yaml+++ b/backend/plugin/advisor/tidb/test/system_collation_allowlist.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE t(a int) COLLATE utf8mb4_polish_ci- changeType: 0+ changeType: 1want:- status: 2code: 1201@@ -10,9 +10,9 @@column: 0endposition: null- statement: CREATE TABLE t(a varchar(255))- changeType: 0+ changeType: 1- statement: CREATE TABLE t(a int) COLLATE latin1_bin- changeType: 0+ changeType: 1want:- status: 2code: 1201@@ -25,7 +25,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t COLLATE latin1_bin- changeType: 0+ changeType: 1want:- status: 2code: 1201@@ -36,7 +36,7 @@column: 0endposition: null- statement: ALTER DATABASE test COLLATE latin1_bin- changeType: 0+ changeType: 1want:- status: 2code: 1201@@ -47,7 +47,7 @@column: 0endposition: null- statement: CREATE TABLE t(a varchar(255) CHARACTER SET latin1 COLLATE latin1_bin)- changeType: 0+ changeType: 1want:- status: 2code: 1201@@ -60,7 +60,7 @@- statement: |-CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN a varchar(255) CHARACTER SET latin1 COLLATE latin1_bin- changeType: 0+ changeType: 1want:- status: 2code: 1201@@ -73,7 +73,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t MODIFY COLUMN a varchar(255) CHARACTER SET latin1 COLLATE latin1_bin- changeType: 0+ changeType: 1want:- status: 2code: 1201@@ -86,7 +86,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t CHANGE COLUMN a a varchar(255) CHARACTER SET latin1 COLLATE latin1_bin- changeType: 0+ changeType: 1want:- status: 2code: 1201diff --git a/backend/plugin/advisor/tidb/test/table_comment.yaml b/backend/plugin/advisor/tidb/test/table_comment.yamlindex 371fb12ec6..31edcd26ed 100644--- a/backend/plugin/advisor/tidb/test/table_comment.yaml+++ b/backend/plugin/advisor/tidb/test/table_comment.yaml@@ -1,5 +1,5 @@- statement: CREATE TABLE t(a int) COMMENT 'some comments'- changeType: 0+ changeType: 1want:- status: 2code: 1301@@ -10,7 +10,7 @@column: 0endposition: null- statement: CREATE TABLE t(a int)- changeType: 0+ changeType: 1want:- status: 2code: 1032@@ -21,7 +21,7 @@column: 0endposition: null- statement: CREATE TABLE t(a int) COMMENT 'sdlfkjalkseblkjduafelbnlsdfkljayue'- changeType: 0+ changeType: 1want:- status: 2code: 1301diff --git a/backend/plugin/advisor/tidb/test/table_disallow_partition.yaml b/backend/plugin/advisor/tidb/test/table_disallow_partition.yamlindex e6589209d2..c6cdfd0fcd 100644--- a/backend/plugin/advisor/tidb/test/table_disallow_partition.yaml+++ b/backend/plugin/advisor/tidb/test/table_disallow_partition.yaml@@ -1,11 +1,11 @@- statement: CREATE TABLE t(a int)- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(a int) PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (6),PARTITION p1 VALUES LESS THAN (11))- changeType: 0+ changeType: 1want:- status: 2code: 608@@ -24,7 +24,7 @@PARTITION p0 VALUES LESS THAN (6),PARTITION p1 VALUES LESS THAN (11))- changeType: 0+ changeType: 1want:- status: 2code: 608diff --git a/backend/plugin/advisor/tidb/test/table_drop_naming_convention.yaml b/backend/plugin/advisor/tidb/test/table_drop_naming_convention.yamlindex b1271e3866..0bc06a44c6 100644--- a/backend/plugin/advisor/tidb/test/table_drop_naming_convention.yaml+++ b/backend/plugin/advisor/tidb/test/table_drop_naming_convention.yaml@@ -1,7 +1,7 @@- statement: DROP TABLE IF EXISTS foo_delete- changeType: 0+ changeType: 1- statement: DROP TABLE IF EXISTS foo- changeType: 0+ changeType: 1want:- status: 2code: 603@@ -12,7 +12,7 @@column: 0endposition: null- statement: DROP TABLE IF EXISTS foo_delete, bar- changeType: 0+ changeType: 1want:- status: 2code: 603diff --git a/backend/plugin/advisor/tidb/test/table_no_foreign_key.yaml b/backend/plugin/advisor/tidb/test/table_no_foreign_key.yamlindex 391b25e470..f97e8cd823 100644--- a/backend/plugin/advisor/tidb/test/table_no_foreign_key.yaml+++ b/backend/plugin/advisor/tidb/test/table_no_foreign_key.yaml@@ -1,5 +1,5 @@- statement: ALTER TABLE tech_book ADD CONSTRAINT fk_tech_book_author_id_author_id FOREIGN KEY (author_id) REFERENCES author (id)- changeType: 0+ changeType: 1want:- status: 2code: 602@@ -10,7 +10,7 @@column: 0endposition: null- statement: CREATE TABLE book(id INT, author_id INT, FOREIGN KEY fk_book_author_id_author_id (author_id) REFERENCES author (id))- changeType: 0+ changeType: 1want:- status: 2code: 602diff --git a/backend/plugin/advisor/tidb/test/table_require_pk.yaml b/backend/plugin/advisor/tidb/test/table_require_pk.yamlindex bcc003db93..32dbee86f1 100644--- a/backend/plugin/advisor/tidb/test/table_require_pk.yaml+++ b/backend/plugin/advisor/tidb/test/table_require_pk.yaml@@ -1,9 +1,9 @@- statement: CREATE TABLE t(id INT PRIMARY KEY)- changeType: 0+ changeType: 1- statement: CREATE TABLE t(id INT, PRIMARY KEY (id))- changeType: 0+ changeType: 1- statement: CREATE TABLE t(id INT)- changeType: 0+ changeType: 1want:- status: 2code: 601@@ -16,15 +16,15 @@- statement: |-CREATE TABLE t(id INT);DROP TABLE t- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id INT);ALTER TABLE t ADD CONSTRAINT PRIMARY KEY (id)- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id INT PRIMARY KEY);ALTER TABLE t DROP PRIMARY KEY- changeType: 0+ changeType: 1want:- status: 2code: 601@@ -37,7 +37,7 @@- statement: |-CREATE TABLE t(id INT PRIMARY KEY);ALTER TABLE t DROP INDEX `PRIMARY`- changeType: 0+ changeType: 1want:- status: 2code: 601@@ -50,27 +50,27 @@- statement: |-CREATE TABLE t(id INT);ALTER TABLE t ADD COLUMN name varchar(30) PRIMARY KEY- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id INT);ALTER TABLE t CHANGE COLUMN id id INT PRIMARY KEY- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book CHANGE COLUMN id uid INT- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id INT);ALTER TABLE t MODIFY COLUMN id INT PRIMARY KEY- changeType: 0+ changeType: 1- statement: ALTER TABLE tech_book MODIFY COLUMN id INT- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id INT, name varchar(30), PRIMARY KEY(id, name));ALTER TABLE t DROP COLUMN id- changeType: 0+ changeType: 1- statement: |-CREATE TABLE t(id INT, name varchar(30), comment varchar(255), PRIMARY KEY(id, name));ALTER TABLE t DROP COLUMN id, DROP COLUMN name- changeType: 0+ changeType: 1want:- status: 2code: 601@@ -81,7 +81,7 @@column: 0endposition: null- statement: ALTER TABLE tech_book ADD COLUMN a int, DROP COLUMN id, DROP COLUMN name- changeType: 0+ changeType: 1want:- status: 2code: 601@@ -92,11 +92,11 @@column: 0endposition: null- statement: ALTER TABLE tech_book DROP COLUMN name- changeType: 0+ changeType: 1- statement: |-ALTER TABLE tech_book CHANGE COLUMN id uid int;ALTER TABLE tech_book ADD COLUMN a int, DROP COLUMN uid, DROP COLUMN name- changeType: 0+ changeType: 1want:- status: 2code: 601