Skip to content

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

Tweak incompatible wording

天舟9277680d866e
diff --git a/plugin/advisor/mysql/mysql_migration_compatibility_advisor.go b/plugin/advisor/mysql/mysql_migration_compatibility_advisor.go
index 6747b3c9ae..f7cedd2270 100644
--- a/plugin/advisor/mysql/mysql_migration_compatibility_advisor.go
+++ b/plugin/advisor/mysql/mysql_migration_compatibility_advisor.go
@@ -143,8 +143,8 @@ END:
if !compatible {
v.advisorList = append(v.advisorList, advisor.Advice{
Status: advisor.Warn,
- Title: "Incompatible migration",
- Content: fmt.Sprintf("%s is backward incompatible", in.Text()),
+ Title: "Potential incompatible migration",
+ Content: fmt.Sprintf("%q may cause incompatibility with the existing data and code", in.Text()),
})
}
return in, false
diff --git a/plugin/advisor/mysql/mysql_migration_compatibility_advisor_test.go b/plugin/advisor/mysql/mysql_migration_compatibility_advisor_test.go
index e59a93399f..229186b1d5 100644
--- a/plugin/advisor/mysql/mysql_migration_compatibility_advisor_test.go
+++ b/plugin/advisor/mysql/mysql_migration_compatibility_advisor_test.go
@@ -40,8 +40,8 @@ func TestBasic(t *testing.T) {
want: []advisor.Advice{
{
Status: advisor.Warn,
- Title: "Incompatible migration",
- Content: "DROP DATABASE d1 is backward incompatible",
+ Title: "Potential incompatible migration",
+ Content: "\"DROP DATABASE d1\" may cause incompatibility with the existing data and code",
},
},
},
@@ -50,8 +50,8 @@ func TestBasic(t *testing.T) {
want: []advisor.Advice{
{
Status: advisor.Warn,
- Title: "Incompatible migration",
- Content: "DROP TABLE t1 is backward incompatible",
+ Title: "Potential incompatible migration",
+ Content: "\"DROP TABLE t1\" may cause incompatibility with the existing data and code",
},
},
},
@@ -60,8 +60,8 @@ func TestBasic(t *testing.T) {
want: []advisor.Advice{
{
Status: advisor.Warn,
- Title: "Incompatible migration",
- Content: "RENAME TABLE t1 to t2 is backward incompatible",
+ Title: "Potential incompatible migration",
+ Content: "\"RENAME TABLE t1 to t2\" may cause incompatibility with the existing data and code",
},
},
},
@@ -70,8 +70,8 @@ func TestBasic(t *testing.T) {
want: []advisor.Advice{
{
Status: advisor.Warn,
- Title: "Incompatible migration",
- Content: "DROP VIEW v1 is backward incompatible",
+ Title: "Potential incompatible migration",
+ Content: "\"DROP VIEW v1\" may cause incompatibility with the existing data and code",
},
},
},
@@ -80,8 +80,8 @@ func TestBasic(t *testing.T) {
want: []advisor.Advice{
{
Status: advisor.Warn,
- Title: "Incompatible migration",
- Content: "CREATE UNIQUE INDEX idx1 ON t1 (f1) is backward incompatible",
+ Title: "Potential incompatible migration",
+ Content: "\"CREATE UNIQUE INDEX idx1 ON t1 (f1)\" may cause incompatibility with the existing data and code",
},
},
},
@@ -90,13 +90,13 @@ func TestBasic(t *testing.T) {
want: []advisor.Advice{
{
Status: advisor.Warn,
- Title: "Incompatible migration",
- Content: "DROP TABLE t1; is backward incompatible",
+ Title: "Potential incompatible migration",
+ Content: "\"DROP TABLE t1;\" may cause incompatibility with the existing data and code",
},
{
Status: advisor.Warn,
- Title: "Incompatible migration",
- Content: "DROP TABLE t2; is backward incompatible",
+ Title: "Potential incompatible migration",
+ Content: "\"DROP TABLE t2;\" may cause incompatibility with the existing data and code",
},
},
},
@@ -122,8 +122,8 @@ func TestAlterTable(t *testing.T) {
want: []advisor.Advice{
{
Status: advisor.Warn,
- Title: "Incompatible migration",
- Content: "ALTER TABLE t1 RENAME COLUMN f1 to f2 is backward incompatible",
+ Title: "Potential incompatible migration",
+ Content: "\"ALTER TABLE t1 RENAME COLUMN f1 to f2\" may cause incompatibility with the existing data and code",
},
},
},
@@ -132,8 +132,8 @@ func TestAlterTable(t *testing.T) {
want: []advisor.Advice{
{
Status: advisor.Warn,
- Title: "Incompatible migration",
- Content: "ALTER TABLE t1 DROP COLUMN f1 is backward incompatible",
+ Title: "Potential incompatible migration",
+ Content: "\"ALTER TABLE t1 DROP COLUMN f1\" may cause incompatibility with the existing data and code",
},
},
},
@@ -142,8 +142,8 @@ func TestAlterTable(t *testing.T) {
want: []advisor.Advice{
{
Status: advisor.Warn,
- Title: "Incompatible migration",
- Content: "ALTER TABLE t1 ADD PRIMARY KEY (f1) is backward incompatible",
+ Title: "Potential incompatible migration",
+ Content: "\"ALTER TABLE t1 ADD PRIMARY KEY (f1)\" may cause incompatibility with the existing data and code",
},
},
},
@@ -152,8 +152,8 @@ func TestAlterTable(t *testing.T) {
want: []advisor.Advice{
{
Status: advisor.Warn,
- Title: "Incompatible migration",
- Content: "ALTER TABLE t1 ADD UNIQUE (f1) is backward incompatible",
+ Title: "Potential incompatible migration",
+ Content: "\"ALTER TABLE t1 ADD UNIQUE (f1)\" may cause incompatibility with the existing data and code",
},
},
},
@@ -162,8 +162,8 @@ func TestAlterTable(t *testing.T) {
want: []advisor.Advice{
{
Status: advisor.Warn,
- Title: "Incompatible migration",
- Content: "ALTER TABLE t1 ADD UNIQUE KEY (f1) is backward incompatible",
+ Title: "Potential incompatible migration",
+ Content: "\"ALTER TABLE t1 ADD UNIQUE KEY (f1)\" may cause incompatibility with the existing data and code",
},
},
},
@@ -172,8 +172,8 @@ func TestAlterTable(t *testing.T) {
want: []advisor.Advice{
{
Status: advisor.Warn,
- Title: "Incompatible migration",
- Content: "ALTER TABLE t1 ADD UNIQUE INDEX (f1) is backward incompatible",
+ Title: "Potential incompatible migration",
+ Content: "\"ALTER TABLE t1 ADD UNIQUE INDEX (f1)\" may cause incompatibility with the existing data and code",
},
},
},
@@ -182,8 +182,8 @@ func TestAlterTable(t *testing.T) {
want: []advisor.Advice{
{
Status: advisor.Warn,
- Title: "Incompatible migration",
- Content: "ALTER TABLE t1 ADD FOREIGN KEY (f1) REFERENCES t2(f2) is backward incompatible",
+ Title: "Potential incompatible migration",
+ Content: "\"ALTER TABLE t1 ADD FOREIGN KEY (f1) REFERENCES t2(f2)\" may cause incompatibility with the existing data and code",
},
},
},
@@ -192,8 +192,8 @@ func TestAlterTable(t *testing.T) {
want: []advisor.Advice{
{
Status: advisor.Warn,
- Title: "Incompatible migration",
- Content: "ALTER TABLE t1 ADD CHECK (f1 > 0) is backward incompatible",
+ Title: "Potential incompatible migration",
+ Content: "\"ALTER TABLE t1 ADD CHECK (f1 > 0)\" may cause incompatibility with the existing data and code",
},
},
},
@@ -212,8 +212,8 @@ func TestAlterTable(t *testing.T) {
want: []advisor.Advice{
{
Status: advisor.Warn,
- Title: "Incompatible migration",
- Content: "ALTER TABLE t1 ALTER CHECK chk1 ENFORCED is backward incompatible",
+ Title: "Potential incompatible migration",
+ Content: "\"ALTER TABLE t1 ALTER CHECK chk1 ENFORCED\" may cause incompatibility with the existing data and code",
},
},
},
@@ -232,8 +232,8 @@ func TestAlterTable(t *testing.T) {
want: []advisor.Advice{
{
Status: advisor.Warn,
- Title: "Incompatible migration",
- Content: "ALTER TABLE t1 ADD CONSTRAINT CHECK (f1 > 0) is backward incompatible",
+ Title: "Potential incompatible migration",
+ Content: "\"ALTER TABLE t1 ADD CONSTRAINT CHECK (f1 > 0)\" may cause incompatibility with the existing data and code",
},
},
},
@@ -259,8 +259,8 @@ func TestAlterTableChangeColumnType(t *testing.T) {
want: []advisor.Advice{
{
Status: advisor.Warn,
- Title: "Incompatible migration",
- Content: "ALTER TABLE t1 CHANGE f1 f2 TEXT is backward incompatible",
+ Title: "Potential incompatible migration",
+ Content: "\"ALTER TABLE t1 CHANGE f1 f2 TEXT\" may cause incompatibility with the existing data and code",
},
},
},
@@ -269,8 +269,8 @@ func TestAlterTableChangeColumnType(t *testing.T) {
want: []advisor.Advice{
{
Status: advisor.Warn,
- Title: "Incompatible migration",
- Content: "ALTER TABLE t1 MODIFY f1 TEXT is backward incompatible",
+ Title: "Potential incompatible migration",
+ Content: "\"ALTER TABLE t1 MODIFY f1 TEXT\" may cause incompatibility with the existing data and code",
},
},
},
@@ -279,8 +279,8 @@ func TestAlterTableChangeColumnType(t *testing.T) {
want: []advisor.Advice{
{
Status: advisor.Warn,
- Title: "Incompatible migration",
- Content: "ALTER TABLE t1 MODIFY f1 TEXT NULL is backward incompatible",
+ Title: "Potential incompatible migration",
+ Content: "\"ALTER TABLE t1 MODIFY f1 TEXT NULL\" may cause incompatibility with the existing data and code",
},
},
},
@@ -289,8 +289,8 @@ func TestAlterTableChangeColumnType(t *testing.T) {
want: []advisor.Advice{
{
Status: advisor.Warn,
- Title: "Incompatible migration",
- Content: "ALTER TABLE t1 MODIFY f1 TEXT NOT NULL is backward incompatible",
+ Title: "Potential incompatible migration",
+ Content: "\"ALTER TABLE t1 MODIFY f1 TEXT NOT NULL\" may cause incompatibility with the existing data and code",
},
},
},
@@ -299,8 +299,8 @@ func TestAlterTableChangeColumnType(t *testing.T) {
want: []advisor.Advice{
{
Status: advisor.Warn,
- Title: "Incompatible migration",
- Content: "ALTER TABLE t1 MODIFY f1 TEXT COMMENT 'bla' is backward incompatible",
+ Title: "Potential incompatible migration",
+ Content: "\"ALTER TABLE t1 MODIFY f1 TEXT COMMENT 'bla'\" may cause incompatibility with the existing data and code",
},
},
},