Skip to content

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

chore: SQL Editor allowlist rules (#13343)

Danny Xub27621a887d3
diff --git a/backend/api/gitops/webhook.go b/backend/api/gitops/webhook.go
index 0f86e7a723..1c159a6b9c 100644
--- a/backend/api/gitops/webhook.go
+++ b/backend/api/gitops/webhook.go
@@ -231,10 +231,17 @@ func (s *Service) sqlReviewWithPRInfo(ctx context.Context, project *store.Projec
warnCount := 0
for _, change := range prInfo.changes {
+ changeType := v1pb.CheckRequest_DDL
+ switch change.changeType {
+ case v1pb.Plan_ChangeDatabaseConfig_DATA:
+ changeType = v1pb.CheckRequest_DML
+ case v1pb.Plan_ChangeDatabaseConfig_MIGRATE_GHOST:
+ changeType = v1pb.CheckRequest_DDL_GHOST
+ }
adviceStatus, advices, err := s.sqlService.SQLReviewCheck(
ctx,
change.content,
- v1pb.CheckRequest_CHANGE_TYPE_UNSPECIFIED,
+ changeType,
instance,
database,
nil, /* Override Metadata */
diff --git a/backend/api/v1/sql_service.go b/backend/api/v1/sql_service.go
index 2a56f6845e..cfb1fbb47b 100644
--- a/backend/api/v1/sql_service.go
+++ b/backend/api/v1/sql_service.go
@@ -185,7 +185,7 @@ func (s *SQLService) Execute(ctx context.Context, request *v1pb.ExecuteRequest)
statement := request.Statement
// Run SQL review.
- adviceStatus, advices, err := s.SQLReviewCheck(ctx, statement, v1pb.CheckRequest_CHANGE_TYPE_UNSPECIFIED, instance, database, nil /* Override Metadata */)
+ adviceStatus, advices, err := s.SQLReviewCheck(ctx, statement, v1pb.CheckRequest_SQL_EDITOR, instance, database, nil /* Override Metadata */)
if err != nil {
return nil, err
}
@@ -333,7 +333,7 @@ func (s *SQLService) Export(ctx context.Context, request *v1pb.ExportRequest) (*
}
// Run SQL review.
- if _, _, err = s.SQLReviewCheck(ctx, statement, v1pb.CheckRequest_CHANGE_TYPE_UNSPECIFIED, instance, database, nil /* Override Metadata */); err != nil {
+ if _, _, err = s.SQLReviewCheck(ctx, statement, v1pb.CheckRequest_SQL_EDITOR, instance, database, nil /* Override Metadata */); err != nil {
return nil, err
}
@@ -750,7 +750,7 @@ func (s *SQLService) Query(ctx context.Context, request *v1pb.QueryRequest) (*v1
}
// Run SQL review.
- adviceStatus, advices, err := s.SQLReviewCheck(ctx, statement, v1pb.CheckRequest_CHANGE_TYPE_UNSPECIFIED, instance, database, nil /* Override Metadata */)
+ adviceStatus, advices, err := s.SQLReviewCheck(ctx, statement, v1pb.CheckRequest_SQL_EDITOR, instance, database, nil /* Override Metadata */)
if err != nil {
return nil, err
}
diff --git a/backend/api/v1/sql_service_utils.go b/backend/api/v1/sql_service_utils.go
index 72129ebf15..a18124a6de 100644
--- a/backend/api/v1/sql_service_utils.go
+++ b/backend/api/v1/sql_service_utils.go
@@ -23,6 +23,8 @@ func convertChangeType(t v1pb.CheckRequest_ChangeType) storepb.PlanCheckRunConfi
return storepb.PlanCheckRunConfig_DDL_GHOST
case v1pb.CheckRequest_DML:
return storepb.PlanCheckRunConfig_DML
+ case v1pb.CheckRequest_SQL_EDITOR:
+ return storepb.PlanCheckRunConfig_SQL_EDITOR
default:
return storepb.PlanCheckRunConfig_CHANGE_DATABASE_TYPE_UNSPECIFIED
}
diff --git a/backend/plugin/advisor/change_type.go b/backend/plugin/advisor/change_type.go
index f9d3f43c2c..9d73960883 100644
--- a/backend/plugin/advisor/change_type.go
+++ b/backend/plugin/advisor/change_type.go
@@ -2,21 +2,17 @@ package advisor
import storepb "github.com/bytebase/bytebase/proto/generated-go/store"
-var ChangeTypeWhiteListForRules = map[SQLReviewRuleType][]storepb.PlanCheckRunConfig_ChangeDatabaseType{
- SchemaRuleStatementCheckSetRoleVariable: {storepb.PlanCheckRunConfig_CHANGE_DATABASE_TYPE_UNSPECIFIED},
+var sqlEditorAllowlist = map[SQLReviewRuleType]bool{
+ SchemaRuleStatementRequireWhere: true,
}
-// SkipRuleInChangeType will skip the sql review check for rule with specific change type.
-func SkipRuleInChangeType(rule SQLReviewRuleType, changeType storepb.PlanCheckRunConfig_ChangeDatabaseType) bool {
- whitelist, ok := ChangeTypeWhiteListForRules[rule]
- if !ok {
- return false
+func isRuleAllowed(rule SQLReviewRuleType, changeType storepb.PlanCheckRunConfig_ChangeDatabaseType) bool {
+ if changeType != storepb.PlanCheckRunConfig_SQL_EDITOR {
+ return true
}
- for _, w := range whitelist {
- if w == changeType {
- return true
- }
+ if _, ok := sqlEditorAllowlist[rule]; ok {
+ return true
}
return false
}
diff --git a/backend/plugin/advisor/sql_review.go b/backend/plugin/advisor/sql_review.go
index 1083aab866..e0676a340d 100644
--- a/backend/plugin/advisor/sql_review.go
+++ b/backend/plugin/advisor/sql_review.go
@@ -516,7 +516,7 @@ func SQLReviewCheck(
}
ruleType := SQLReviewRuleType(rule.Type)
- if SkipRuleInChangeType(ruleType, checkContext.ChangeType) {
+ if !isRuleAllowed(ruleType, checkContext.ChangeType) {
continue
}
diff --git a/frontend/src/types/proto/store/plan_check_run.ts b/frontend/src/types/proto/store/plan_check_run.ts
index fc158651de..0950ff919e 100644
--- a/frontend/src/types/proto/store/plan_check_run.ts
+++ b/frontend/src/types/proto/store/plan_check_run.ts
@@ -32,6 +32,7 @@ export enum PlanCheckRunConfig_ChangeDatabaseType {
DML = "DML",
SDL = "SDL",
DDL_GHOST = "DDL_GHOST",
+ SQL_EDITOR = "SQL_EDITOR",
UNRECOGNIZED = "UNRECOGNIZED",
}
@@ -52,6 +53,9 @@ export function planCheckRunConfig_ChangeDatabaseTypeFromJSON(object: any): Plan
case 4:
case "DDL_GHOST":
return PlanCheckRunConfig_ChangeDatabaseType.DDL_GHOST;
+ case 5:
+ case "SQL_EDITOR":
+ return PlanCheckRunConfig_ChangeDatabaseType.SQL_EDITOR;
case -1:
case "UNRECOGNIZED":
default:
@@ -71,6 +75,8 @@ export function planCheckRunConfig_ChangeDatabaseTypeToJSON(object: PlanCheckRun
return "SDL";
case PlanCheckRunConfig_ChangeDatabaseType.DDL_GHOST:
return "DDL_GHOST";
+ case PlanCheckRunConfig_ChangeDatabaseType.SQL_EDITOR:
+ return "SQL_EDITOR";
case PlanCheckRunConfig_ChangeDatabaseType.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
@@ -89,6 +95,8 @@ export function planCheckRunConfig_ChangeDatabaseTypeToNumber(object: PlanCheckR
return 3;
case PlanCheckRunConfig_ChangeDatabaseType.DDL_GHOST:
return 4;
+ case PlanCheckRunConfig_ChangeDatabaseType.SQL_EDITOR:
+ return 5;
case PlanCheckRunConfig_ChangeDatabaseType.UNRECOGNIZED:
default:
return -1;
diff --git a/frontend/src/types/proto/v1/sql_service.ts b/frontend/src/types/proto/v1/sql_service.ts
index eb630d7a69..9874119ea7 100644
--- a/frontend/src/types/proto/v1/sql_service.ts
+++ b/frontend/src/types/proto/v1/sql_service.ts
@@ -304,6 +304,7 @@ export enum CheckRequest_ChangeType {
DDL = "DDL",
DDL_GHOST = "DDL_GHOST",
DML = "DML",
+ SQL_EDITOR = "SQL_EDITOR",
UNRECOGNIZED = "UNRECOGNIZED",
}
@@ -321,6 +322,9 @@ export function checkRequest_ChangeTypeFromJSON(object: any): CheckRequest_Chang
case 3:
case "DML":
return CheckRequest_ChangeType.DML;
+ case 4:
+ case "SQL_EDITOR":
+ return CheckRequest_ChangeType.SQL_EDITOR;
case -1:
case "UNRECOGNIZED":
default:
@@ -338,6 +342,8 @@ export function checkRequest_ChangeTypeToJSON(object: CheckRequest_ChangeType):
return "DDL_GHOST";
case CheckRequest_ChangeType.DML:
return "DML";
+ case CheckRequest_ChangeType.SQL_EDITOR:
+ return "SQL_EDITOR";
case CheckRequest_ChangeType.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
@@ -354,6 +360,8 @@ export function checkRequest_ChangeTypeToNumber(object: CheckRequest_ChangeType)
return 2;
case CheckRequest_ChangeType.DML:
return 3;
+ case CheckRequest_ChangeType.SQL_EDITOR:
+ return 4;
case CheckRequest_ChangeType.UNRECOGNIZED:
default:
return -1;
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index 8f33d14763..fba08ac938 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -8837,6 +8837,7 @@ components:
- DDL
- DDL_GHOST
- DML
+ - SQL_EDITOR
type: string
format: enum
CheckResponse:
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index 0130c52c36..91bcb7b942 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -2976,6 +2976,7 @@ Type is the database change type.
| DML | 2 | |
| SDL | 3 | |
| DDL_GHOST | 4 | |
+| SQL_EDITOR | 5 | |
diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.html
index 17db1edaed..4606093069 100644
--- a/proto/gen/grpc-doc/store/index.html
+++ b/proto/gen/grpc-doc/store/index.html
@@ -7846,6 +7846,12 @@ Format: instances/{instance}/databases/{database} </p></td>
<td><p></p></td>
</tr>
+ <tr>
+ <td>SQL_EDITOR</td>
+ <td>5</td>
+ <td><p></p></td>
+ </tr>
+
</tbody>
</table>
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 0bc27faf8c..d9bb2e25d3 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -10566,6 +10566,7 @@ Type of the SheetPayload.
| DDL | 1 | |
| DDL_GHOST | 2 | |
| DML | 3 | |
+| SQL_EDITOR | 4 | |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index 9dd0fe4bd8..6a586deb1c 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -28797,6 +28797,12 @@ to retrieve the next page of history. </p></td>
<td><p></p></td>
</tr>
+ <tr>
+ <td>SQL_EDITOR</td>
+ <td>4</td>
+ <td><p></p></td>
+ </tr>
+
</tbody>
</table>
diff --git a/proto/generated-go/store/plan_check_run.pb.go b/proto/generated-go/store/plan_check_run.pb.go
index 2e8edf0891..8ad606e9b1 100644
--- a/proto/generated-go/store/plan_check_run.pb.go
+++ b/proto/generated-go/store/plan_check_run.pb.go
@@ -28,6 +28,7 @@ const (
PlanCheckRunConfig_DML PlanCheckRunConfig_ChangeDatabaseType = 2
PlanCheckRunConfig_SDL PlanCheckRunConfig_ChangeDatabaseType = 3
PlanCheckRunConfig_DDL_GHOST PlanCheckRunConfig_ChangeDatabaseType = 4
+ PlanCheckRunConfig_SQL_EDITOR PlanCheckRunConfig_ChangeDatabaseType = 5
)
// Enum value maps for PlanCheckRunConfig_ChangeDatabaseType.
@@ -38,6 +39,7 @@ var (
2: "DML",
3: "SDL",
4: "DDL_GHOST",
+ 5: "SQL_EDITOR",
}
PlanCheckRunConfig_ChangeDatabaseType_value = map[string]int32{
"CHANGE_DATABASE_TYPE_UNSPECIFIED": 0,
@@ -45,6 +47,7 @@ var (
"DML": 2,
"SDL": 3,
"DDL_GHOST": 4,
+ "SQL_EDITOR": 5,
}
)
@@ -616,7 +619,7 @@ var file_store_plan_check_run_proto_rawDesc = []byte{
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x33, 0x0a, 0x15, 0x50, 0x72, 0x65, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x1a,
0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x22, 0xac, 0x05, 0x0a, 0x12, 0x50,
+ 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x22, 0xbc, 0x05, 0x0a, 0x12, 0x50,
0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69,
0x67, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x68, 0x65, 0x65, 0x74, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x73, 0x68, 0x65, 0x65, 0x74, 0x55, 0x69, 0x64, 0x12, 0x67,
@@ -650,13 +653,14 @@ var file_store_plan_check_run_proto_rawDesc = []byte{
0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22,
- 0x64, 0x0a, 0x12, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,
+ 0x74, 0x0a, 0x12, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,
0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x20, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f,
0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e,
0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x44,
0x44, 0x4c, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x4d, 0x4c, 0x10, 0x02, 0x12, 0x07, 0x0a,
0x03, 0x53, 0x44, 0x4c, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x44, 0x4c, 0x5f, 0x47, 0x48,
- 0x4f, 0x53, 0x54, 0x10, 0x04, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61,
+ 0x4f, 0x53, 0x54, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x51, 0x4c, 0x5f, 0x45, 0x44, 0x49,
+ 0x54, 0x4f, 0x52, 0x10, 0x05, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61,
0x73, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x75, 0x69, 0x64, 0x42, 0x1b, 0x0a, 0x19,
0x5f, 0x70, 0x72, 0x65, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b,
0x75, 0x70, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x22, 0xde, 0x07, 0x0a, 0x12, 0x50, 0x6c,
diff --git a/proto/generated-go/v1/sql_service.pb.go b/proto/generated-go/v1/sql_service.pb.go
index 37639da14d..67436795d1 100644
--- a/proto/generated-go/v1/sql_service.pb.go
+++ b/proto/generated-go/v1/sql_service.pb.go
@@ -84,6 +84,7 @@ const (
CheckRequest_DDL CheckRequest_ChangeType = 1
CheckRequest_DDL_GHOST CheckRequest_ChangeType = 2
CheckRequest_DML CheckRequest_ChangeType = 3
+ CheckRequest_SQL_EDITOR CheckRequest_ChangeType = 4
)
// Enum value maps for CheckRequest_ChangeType.
@@ -93,12 +94,14 @@ var (
1: "DDL",
2: "DDL_GHOST",
3: "DML",
+ 4: "SQL_EDITOR",
}
CheckRequest_ChangeType_value = map[string]int32{
"CHANGE_TYPE_UNSPECIFIED": 0,
"DDL": 1,
"DDL_GHOST": 2,
"DML": 3,
+ "SQL_EDITOR": 4,
}
)
@@ -2402,7 +2405,7 @@ var file_v1_sql_service_proto_rawDesc = []byte{
0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x27, 0x0a,
0x0f, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64,
- 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0xb4, 0x02, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b,
+ 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0xc4, 0x02, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1e, 0xe2, 0x41, 0x01, 0x02, 0xfa, 0x41, 0x17, 0x0a, 0x15,
0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74,
@@ -2417,11 +2420,12 @@ var file_v1_sql_service_proto_rawDesc = []byte{
0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68,
0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67,
0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70,
- 0x65, 0x22, 0x4a, 0x0a, 0x0a, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12,
+ 0x65, 0x22, 0x5a, 0x0a, 0x0a, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12,
0x1b, 0x0a, 0x17, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55,
0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03,
0x44, 0x44, 0x4c, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x44, 0x4c, 0x5f, 0x47, 0x48, 0x4f,
- 0x53, 0x54, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x4d, 0x4c, 0x10, 0x03, 0x22, 0x3e, 0x0a,
+ 0x53, 0x54, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x4d, 0x4c, 0x10, 0x03, 0x12, 0x0e, 0x0a,
+ 0x0a, 0x53, 0x51, 0x4c, 0x5f, 0x45, 0x44, 0x49, 0x54, 0x4f, 0x52, 0x10, 0x04, 0x22, 0x3e, 0x0a,
0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d,
0x0a, 0x07, 0x61, 0x64, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64,
diff --git a/proto/store/plan_check_run.proto b/proto/store/plan_check_run.proto
index c22d988c0b..1d1c977073 100644
--- a/proto/store/plan_check_run.proto
+++ b/proto/store/plan_check_run.proto
@@ -31,6 +31,7 @@ message PlanCheckRunConfig {
DML = 2;
SDL = 3;
DDL_GHOST = 4;
+ SQL_EDITOR = 5;
}
}
diff --git a/proto/v1/sql_service.proto b/proto/v1/sql_service.proto
index 37fbd8e0ff..822e86cc06 100644
--- a/proto/v1/sql_service.proto
+++ b/proto/v1/sql_service.proto
@@ -384,6 +384,7 @@ message CheckRequest {
DDL = 1;
DDL_GHOST = 2;
DML = 3;
+ SQL_EDITOR = 4;
}
ChangeType change_type = 4;
}