Skip to content

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

chore: no statement type plan checks (#12197)

Danny Xu883cecceba38
diff --git a/backend/api/v1/plan_service_plan_check.go b/backend/api/v1/plan_service_plan_check.go
index 72a57ca5f4..4d057e8ec1 100644
--- a/backend/api/v1/plan_service_plan_check.go
+++ b/backend/api/v1/plan_service_plan_check.go
@@ -259,20 +259,6 @@ func getPlanCheckRunsFromChangeDatabaseConfigForDatabase(ctx context.Context, s
return planCheckRuns, nil
}
- planCheckRuns = append(planCheckRuns, &store.PlanCheckRunMessage{
- CreatorUID: api.SystemBotID,
- UpdaterUID: api.SystemBotID,
- PlanUID: plan.UID,
- Status: store.PlanCheckRunStatusRunning,
- Type: store.PlanCheckDatabaseStatementType,
- Config: &storepb.PlanCheckRunConfig{
- SheetUid: int32(sheetUID),
- ChangeDatabaseType: convertToChangeDatabaseType(config.Type),
- InstanceUid: int32(instance.UID),
- DatabaseName: database.DatabaseName,
- DatabaseGroupUid: databaseGroupUID,
- },
- })
preUpdateBackupDetail := (*storepb.PlanCheckRunConfig_PreUpdateBackupDetail)(nil)
if config.PreUpdateBackupDetail != nil {
preUpdateBackupDetail = &storepb.PlanCheckRunConfig_PreUpdateBackupDetail{
@@ -376,7 +362,6 @@ func getPlanCheckRunsFromExportDataConfigForDatabase(ctx context.Context, s *sto
planCheckRunTypes := []store.PlanCheckRunType{
store.PlanCheckDatabaseConnect,
- store.PlanCheckDatabaseStatementType,
store.PlanCheckDatabaseStatementAdvise,
}
planCheckRuns := []*store.PlanCheckRunMessage{}
diff --git a/backend/api/v1/rollout_service_converter.go b/backend/api/v1/rollout_service_converter.go
index b3741d08e0..f967faf6ef 100644
--- a/backend/api/v1/rollout_service_converter.go
+++ b/backend/api/v1/rollout_service_converter.go
@@ -356,8 +356,6 @@ func convertToPlanCheckRunType(t store.PlanCheckRunType) v1pb.PlanCheckRun_Type
return v1pb.PlanCheckRun_DATABASE_STATEMENT_COMPATIBILITY
case store.PlanCheckDatabaseStatementAdvise:
return v1pb.PlanCheckRun_DATABASE_STATEMENT_ADVISE
- case store.PlanCheckDatabaseStatementType:
- return v1pb.PlanCheckRun_DATABASE_STATEMENT_TYPE
case store.PlanCheckDatabaseStatementSummaryReport:
return v1pb.PlanCheckRun_DATABASE_STATEMENT_SUMMARY_REPORT
case store.PlanCheckDatabaseConnect:
diff --git a/backend/migrator/migration/prod/2.19/0000##statement_type_check.sql b/backend/migrator/migration/prod/2.19/0000##statement_type_check.sql
new file mode 100644
index 0000000000..0a958787ce
--- /dev/null
+++ b/backend/migrator/migration/prod/2.19/0000##statement_type_check.sql
@@ -0,0 +1 @@
+DELETE FROM plan_check_run WHERE type = 'bb.plan-check.database.statement.type';
\ No newline at end of file
diff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.go
index 197816dc24..04fa95fcb2 100644
--- a/backend/migrator/migrator_test.go
+++ b/backend/migrator/migrator_test.go
@@ -230,5 +230,5 @@ func TestMigrationCompatibility(t *testing.T) {
func TestGetCutoffVersion(t *testing.T) {
releaseVersion, err := getProdCutoffVersion()
require.NoError(t, err)
- require.Equal(t, semver.MustParse("2.18.8"), releaseVersion)
+ require.Equal(t, semver.MustParse("2.19.0"), releaseVersion)
}
diff --git a/backend/runner/plancheck/executor.go b/backend/runner/plancheck/executor.go
index 0a4166d588..0451770cd7 100644
--- a/backend/runner/plancheck/executor.go
+++ b/backend/runner/plancheck/executor.go
@@ -31,15 +31,6 @@ type Executor interface {
Run(ctx context.Context, config *storepb.PlanCheckRunConfig) (results []*storepb.PlanCheckRunResult_Result, err error)
}
-func isStatementTypeCheckSupported(dbType storepb.Engine) bool {
- switch dbType {
- case storepb.Engine_POSTGRES, storepb.Engine_TIDB, storepb.Engine_MYSQL, storepb.Engine_MARIADB, storepb.Engine_OCEANBASE:
- return true
- default:
- return false
- }
-}
-
func isStatementAdviseSupported(dbType storepb.Engine) bool {
switch dbType {
case storepb.Engine_MYSQL, storepb.Engine_TIDB, storepb.Engine_POSTGRES, storepb.Engine_ORACLE, storepb.Engine_OCEANBASE_ORACLE, storepb.Engine_OCEANBASE, storepb.Engine_SNOWFLAKE, storepb.Engine_MSSQL:
diff --git a/backend/runner/plancheck/statement_type_executor.go b/backend/runner/plancheck/statement_type_executor.go
deleted file mode 100644
index 646174dac5..0000000000
--- a/backend/runner/plancheck/statement_type_executor.go
+++ /dev/null
@@ -1,639 +0,0 @@
-package plancheck
-
-import (
- "context"
- "fmt"
-
- "github.com/antlr4-go/antlr/v4"
- tidbp "github.com/pingcap/tidb/pkg/parser"
- tidbast "github.com/pingcap/tidb/pkg/parser/ast"
- "github.com/pkg/errors"
-
- "github.com/bytebase/bytebase/backend/common"
- "github.com/bytebase/bytebase/backend/component/dbfactory"
- "github.com/bytebase/bytebase/backend/plugin/advisor"
- "github.com/bytebase/bytebase/backend/plugin/parser/base"
- mysqlparser "github.com/bytebase/bytebase/backend/plugin/parser/mysql"
- "github.com/bytebase/bytebase/backend/plugin/parser/sql/ast"
- pgrawparser "github.com/bytebase/bytebase/backend/plugin/parser/sql/engine/pg"
- tidbparser "github.com/bytebase/bytebase/backend/plugin/parser/tidb"
- runnerutils "github.com/bytebase/bytebase/backend/runner/utils"
- "github.com/bytebase/bytebase/backend/store"
- "github.com/bytebase/bytebase/backend/utils"
- storepb "github.com/bytebase/bytebase/proto/generated-go/store"
-)
-
-var _ Executor = (*StatementTypeExecutor)(nil)
-
-// NewStatementTypeExecutor creates a statement type executor.
-func NewStatementTypeExecutor(store *store.Store, dbFactory *dbfactory.DBFactory) Executor {
- return &StatementTypeExecutor{
- store: store,
- dbFactory: dbFactory,
- }
-}
-
-// StatementTypeExecutor is the statement type executor.
-type StatementTypeExecutor struct {
- store *store.Store
- dbFactory *dbfactory.DBFactory
-}
-
-// Run runs the statement type executor.
-func (e *StatementTypeExecutor) Run(ctx context.Context, config *storepb.PlanCheckRunConfig) ([]*storepb.PlanCheckRunResult_Result, error) {
- if config.ChangeDatabaseType == storepb.PlanCheckRunConfig_CHANGE_DATABASE_TYPE_UNSPECIFIED {
- return nil, errors.Errorf("change database type is unspecified")
- }
-
- if config.DatabaseGroupUid != nil {
- return e.runForDatabaseGroupTarget(ctx, config, *config.DatabaseGroupUid)
- }
- return e.runForDatabaseTarget(ctx, config)
-}
-
-func (e *StatementTypeExecutor) runForDatabaseTarget(ctx context.Context, config *storepb.PlanCheckRunConfig) ([]*storepb.PlanCheckRunResult_Result, error) {
- changeType := config.ChangeDatabaseType
-
- instanceUID := int(config.InstanceUid)
- instance, err := e.store.GetInstanceV2(ctx, &store.FindInstanceMessage{UID: &instanceUID})
- if err != nil {
- return nil, errors.Wrapf(err, "failed to get instance UID %v", instanceUID)
- }
- if instance == nil {
- return nil, errors.Errorf("instance not found UID %v", instanceUID)
- }
-
- if !isStatementTypeCheckSupported(instance.Engine) {
- return []*storepb.PlanCheckRunResult_Result{
- {
- Status: storepb.PlanCheckRunResult_Result_SUCCESS,
- Code: common.Ok.Int32(),
- Title: fmt.Sprintf("Statement advise is not supported for %s", instance.Engine),
- Content: "",
- },
- }, nil
- }
-
- database, err := e.store.GetDatabaseV2(ctx, &store.FindDatabaseMessage{InstanceID: &instance.ResourceID, DatabaseName: &config.DatabaseName})
- if err != nil {
- return nil, errors.Wrapf(err, "failed to get database %q", config.DatabaseName)
- }
- if database == nil {
- return nil, errors.Errorf("database not found %q", config.DatabaseName)
- }
-
- dbSchema, err := e.store.GetDBSchema(ctx, database.UID)
- if err != nil {
- return nil, err
- }
- if dbSchema == nil {
- return nil, errors.Errorf("database schema not found: %d", database.UID)
- }
-
- sheetUID := int(config.SheetUid)
- sheet, err := e.store.GetSheet(ctx, &store.FindSheetMessage{UID: &sheetUID})
- if err != nil {
- return nil, errors.Wrapf(err, "failed to get sheet %d", sheetUID)
- }
- if sheet == nil {
- return nil, errors.Errorf("sheet %d not found", sheetUID)
- }
- if sheet.Size > common.MaxSheetCheckSize {
- return []*storepb.PlanCheckRunResult_Result{
- {
- Status: storepb.PlanCheckRunResult_Result_WARNING,
- Code: common.SizeExceeded.Int32(),
- Title: "Large SQL review policy is disabled",
- Content: "",
- },
- }, nil
- }
-
- statement, err := e.store.GetSheetStatementByID(ctx, sheetUID)
- if err != nil {
- return nil, errors.Wrapf(err, "failed to get sheet statement %d", sheetUID)
- }
-
- materials := utils.GetSecretMapFromDatabaseMessage(database)
- // To avoid leaking the rendered statement, the error message should use the original statement and not the rendered statement.
- renderedStatement := utils.RenderStatement(statement, materials)
-
- var results []*storepb.PlanCheckRunResult_Result
- switch instance.Engine {
- case storepb.Engine_POSTGRES, storepb.Engine_RISINGWAVE:
- checkResults, err := postgresqlStatementTypeCheck(renderedStatement)
- if err != nil {
- return nil, err
- }
- results = append(results, checkResults...)
- case storepb.Engine_TIDB:
- checkResults, err := tidbStatementTypeCheck(renderedStatement, dbSchema.GetMetadata().CharacterSet, dbSchema.GetMetadata().Collation)
- if err != nil {
- return nil, err
- }
- results = append(results, checkResults...)
- if changeType == storepb.PlanCheckRunConfig_SDL {
- sdlAdvice, err := e.tidbSDLTypeCheck(ctx, renderedStatement, instance, database)
- if err != nil {
- return nil, err
- }
- results = append(results, sdlAdvice...)
- }
- case storepb.Engine_MYSQL, storepb.Engine_OCEANBASE:
- checkResults, err := mysqlStatementTypeCheck(renderedStatement)
- if err != nil {
- return nil, err
- }
- results = append(results, checkResults...)
- if changeType == storepb.PlanCheckRunConfig_SDL {
- sdlAdvice, err := e.mysqlSDLTypeCheck(ctx, renderedStatement, instance, database)
- if err != nil {
- return nil, err
- }
- results = append(results, sdlAdvice...)
- }
- default:
- return nil, common.Errorf(common.Invalid, "invalid check statement type database type: %s", instance.Engine)
- }
-
- if len(results) == 0 {
- return []*storepb.PlanCheckRunResult_Result{
- {
- Status: storepb.PlanCheckRunResult_Result_SUCCESS,
- Title: "OK",
- Content: "",
- Code: common.Ok.Int32(),
- Report: nil,
- },
- }, nil
- }
-
- return results, nil
-}
-
-func (e *StatementTypeExecutor) runForDatabaseGroupTarget(ctx context.Context, config *storepb.PlanCheckRunConfig, databaseGroupUID int64) ([]*storepb.PlanCheckRunResult_Result, error) {
- changeType := config.ChangeDatabaseType
-
- databaseGroup, err := e.store.GetDatabaseGroup(ctx, &store.FindDatabaseGroupMessage{
- UID: &databaseGroupUID,
- })
- if err != nil {
- return nil, errors.Wrapf(err, "failed to get database group %d", databaseGroupUID)
- }
- if databaseGroup == nil {
- return nil, errors.Errorf("database group not found %d", databaseGroupUID)
- }
-
- project, err := e.store.GetProjectV2(ctx, &store.FindProjectMessage{
- UID: &databaseGroup.ProjectUID,
- })
- if err != nil {
- return nil, errors.Wrapf(err, "failed to get project %d", databaseGroup.ProjectUID)
- }
- if project == nil {
- return nil, errors.Errorf("project not found %d", databaseGroup.ProjectUID)
- }
-
- allDatabases, err := e.store.ListDatabases(ctx, &store.FindDatabaseMessage{ProjectID: &project.ResourceID})
- if err != nil {
- return nil, errors.Wrapf(err, "failed to list databases for project %q", project.ResourceID)
- }
-
- matchedDatabases, _, err := utils.GetMatchedAndUnmatchedDatabasesInDatabaseGroup(ctx, databaseGroup, allDatabases)
- if err != nil {
- return nil, errors.Wrapf(err, "failed to get matched and unmatched databases in database group %q", databaseGroup.ResourceID)
- }
- if len(matchedDatabases) == 0 {
- return nil, errors.Errorf("no matched databases found in database group %q", databaseGroup.ResourceID)
- }
-
- sheetUID := int(config.SheetUid)
- sheet, err := e.store.GetSheet(ctx, &store.FindSheetMessage{UID: &sheetUID})
- if err != nil {
- return nil, errors.Wrapf(err, "failed to get sheet %d", sheetUID)
- }
- if sheet == nil {
- return nil, errors.Errorf("sheet %d not found", sheetUID)
- }
- if sheet.Size > common.MaxSheetCheckSize {
- return []*storepb.PlanCheckRunResult_Result{
- {
- Status: storepb.PlanCheckRunResult_Result_WARNING,
- Code: common.SizeExceeded.Int32(),
- Title: "Large SQL review policy is disabled",
- Content: "",
- },
- }, nil
- }
- sheetStatement, err := e.store.GetSheetStatementByID(ctx, sheetUID)
- if err != nil {
- return nil, errors.Wrapf(err, "failed to get sheet statement %d", sheetUID)
- }
-
- var results []*storepb.PlanCheckRunResult_Result
-
- for _, database := range matchedDatabases {
- if database.DatabaseName != config.DatabaseName {
- continue
- }
-
- instance, err := e.store.GetInstanceV2(ctx, &store.FindInstanceMessage{ResourceID: &database.InstanceID})
- if err != nil {
- return nil, errors.Wrapf(err, "failed to get instance %q", database.InstanceID)
- }
- if instance == nil {
- return nil, errors.Errorf("instance %q not found", database.InstanceID)
- }
- if !isStatementTypeCheckSupported(instance.Engine) {
- continue
- }
- if instance.UID != int(config.InstanceUid) {
- continue
- }
-
- environment, err := e.store.GetEnvironmentV2(ctx, &store.FindEnvironmentMessage{ResourceID: &database.EffectiveEnvironmentID})
- if err != nil {
- return nil, err
- }
- if environment == nil {
- return nil, errors.Errorf("environment %q not found", database.EffectiveEnvironmentID)
- }
-
- dbSchema, err := e.store.GetDBSchema(ctx, database.UID)
- if err != nil {
- return nil, errors.Wrapf(err, "failed to get db schema %q", database.UID)
- }
-
- materials := utils.GetSecretMapFromDatabaseMessage(database)
- // To avoid leaking the rendered statement, the error message should use the original statement and not the rendered statement.
- renderedStatement := utils.RenderStatement(sheetStatement, materials)
-
- stmtResults, err := func() ([]*storepb.PlanCheckRunResult_Result, error) {
- var results []*storepb.PlanCheckRunResult_Result
- switch instance.Engine {
- case storepb.Engine_POSTGRES, storepb.Engine_RISINGWAVE:
- checkResults, err := postgresqlStatementTypeCheck(renderedStatement)
- if err != nil {
- return nil, err
- }
- results = append(results, checkResults...)
- case storepb.Engine_TIDB:
- checkResults, err := tidbStatementTypeCheck(renderedStatement, dbSchema.GetMetadata().CharacterSet, dbSchema.GetMetadata().Collation)
- if err != nil {
- return nil, err
- }
- results = append(results, checkResults...)
- if changeType == storepb.PlanCheckRunConfig_SDL {
- sdlAdvice, err := e.tidbSDLTypeCheck(ctx, renderedStatement, instance, database)
- if err != nil {
- return nil, err
- }
- results = append(results, sdlAdvice...)
- }
- case storepb.Engine_MYSQL, storepb.Engine_MARIADB, storepb.Engine_OCEANBASE:
- checkResults, err := mysqlStatementTypeCheck(renderedStatement)
- if err != nil {
- return nil, err
- }
- results = append(results, checkResults...)
- if changeType == storepb.PlanCheckRunConfig_SDL {
- sdlAdvice, err := e.mysqlSDLTypeCheck(ctx, renderedStatement, instance, database)
- if err != nil {
- return nil, err
- }
- results = append(results, sdlAdvice...)
- }
- default:
- return nil, common.Errorf(common.Invalid, "invalid check statement type database type: %s", instance.Engine)
- }
-
- return results, nil
- }()
- if err != nil {
- results = append(results, &storepb.PlanCheckRunResult_Result{
- Status: storepb.PlanCheckRunResult_Result_ERROR,
- Title: "Failed to run statement type check",
- Content: err.Error(),
- Code: common.Internal.Int32(),
- Report: nil,
- })
- } else {
- results = append(results, stmtResults...)
- }
- }
-
- if len(results) == 0 {
- return []*storepb.PlanCheckRunResult_Result{
- {
- Status: storepb.PlanCheckRunResult_Result_SUCCESS,
- Title: "OK",
- Content: "",
- Code: common.Ok.Int32(),
- Report: nil,
- },
- }, nil
- }
-
- return results, nil
-}
-
-func (e *StatementTypeExecutor) tidbSDLTypeCheck(ctx context.Context, newSchema string, instance *store.InstanceMessage, database *store.DatabaseMessage) ([]*storepb.PlanCheckRunResult_Result, error) {
- ddl, err := runnerutils.ComputeDatabaseSchemaDiff(ctx, instance, database, e.dbFactory, newSchema)
- if err != nil {
- return nil, err
- }
-
- singleSQLs, err := base.SplitMultiSQL(storepb.Engine_MYSQL, ddl)
- if err != nil {
- return nil, errors.Wrapf(err, "failed to split SQL")
- }
- singleSQLs = base.FilterEmptySQL(singleSQLs)
-
- var results []*storepb.PlanCheckRunResult_Result
- for _, singleSQL := range singleSQLs {
- if tidbparser.IsTiDBUnsupportDDLStmt(singleSQL.Text) {
- continue
- }
- nodeList, _, err := tidbp.New().Parse(singleSQL.Text, "", "")
- if err != nil {
- return nil, errors.Wrapf(err, "failed to parse schema %q", singleSQL.Text)
- }
- if len(nodeList) != 1 {
- return nil, errors.Errorf("Expect one statement after splitting but found %d", len(nodeList))
- }
-
- switch node := nodeList[0].(type) {
- case *tidbast.DropTableStmt:
- for _, table := range node.Tables {
- results = append(results, &storepb.PlanCheckRunResult_Result{
- Status: storepb.PlanCheckRunResult_Result_WARNING,
- Code: common.TaskTypeDropTable.Int32(),
- Title: "Plan to drop table",
- Content: fmt.Sprintf("Plan to drop table `%s`", table.Name.O),
- Report: &storepb.PlanCheckRunResult_Result_SqlReviewReport_{
- SqlReviewReport: &storepb.PlanCheckRunResult_Result_SqlReviewReport{
- Line: int32(singleSQL.LastLine),
- Detail: "",
- Code: 0,
- },
- },
- })
- }
- case *tidbast.DropIndexStmt:
- results = append(results, &storepb.PlanCheckRunResult_Result{
- Status: storepb.PlanCheckRunResult_Result_WARNING,
- Code: common.TaskTypeDropIndex.Int32(),
- Title: "Plan to drop index",
- Content: fmt.Sprintf("Plan to drop index `%s` on table `%s`", node.IndexName, node.Table.Name.O),
- Report: &storepb.PlanCheckRunResult_Result_SqlReviewReport_{
- SqlReviewReport: &storepb.PlanCheckRunResult_Result_SqlReviewReport{
- Line: int32(singleSQL.LastLine),
- Detail: "",
- Code: 0,
- },
- },
- })
- case *tidbast.AlterTableStmt:
- for _, spec := range node.Specs {
- switch spec.Tp {
- case tidbast.AlterTableDropColumn:
- results = append(results, &storepb.PlanCheckRunResult_Result{
- Status: storepb.PlanCheckRunResult_Result_WARNING,
- Code: common.TaskTypeDropColumn.Int32(),
- Title: "Plan to drop column",
- Content: fmt.Sprintf("Plan to drop column `%s` on table `%s`", spec.OldColumnName.Name.O, node.Table.Name.O),
- Report: &storepb.PlanCheckRunResult_Result_SqlReviewReport_{
- SqlReviewReport: &storepb.PlanCheckRunResult_Result_SqlReviewReport{
- Line: int32(singleSQL.LastLine),
- Detail: "",
- Code: 0,
- },
- },
- })
- case tidbast.AlterTableDropPrimaryKey:
- results = append(results, &storepb.PlanCheckRunResult_Result{
- Status: storepb.PlanCheckRunResult_Result_WARNING,
- Code: common.TaskTypeDropPrimaryKey.Int32(),
- Title: "Plan to drop primary key",
- Content: fmt.Sprintf("Plan to drop primary key on table `%s`", node.Table.Name.O),
- Report: &storepb.PlanCheckRunResult_Result_SqlReviewReport_{
- SqlReviewReport: &storepb.PlanCheckRunResult_Result_SqlReviewReport{
- Line: int32(singleSQL.LastLine),
- Detail: "",
- Code: 0,
- },
- },
- })
- case tidbast.AlterTableDropForeignKey:
- results = append(results, &storepb.PlanCheckRunResult_Result{
- Status: storepb.PlanCheckRunResult_Result_WARNING,
- Code: common.TaskTypeDropForeignKey.Int32(),
- Title: "Plan to drop foreign key",
- Content: fmt.Sprintf("Plan to drop foreign key `%s` on table `%s`", spec.Name, node.Table.Name.O),
- Report: &storepb.PlanCheckRunResult_Result_SqlReviewReport_{
- SqlReviewReport: &storepb.PlanCheckRunResult_Result_SqlReviewReport{
- Line: int32(singleSQL.LastLine),
- Detail: "",
- Code: 0,
- },
- },
- })
- case tidbast.AlterTableDropCheck:
- results = append(results, &storepb.PlanCheckRunResult_Result{
- Status: storepb.PlanCheckRunResult_Result_WARNING,
- Code: common.TaskTypeDropCheck.Int32(),
- Title: "Plan to drop check constraint",
- Content: fmt.Sprintf("Plan to drop check constraint `%s` on table `%s`", spec.Constraint.Name, node.Table.Name.O),
- Report: &storepb.PlanCheckRunResult_Result_SqlReviewReport_{
- SqlReviewReport: &storepb.PlanCheckRunResult_Result_SqlReviewReport{
- Line: int32(singleSQL.LastLine),
- Detail: "",
- Code: 0,
- },
- },
- })
- }
- }
- }
- }
- return results, nil
-}
-
-func tidbCreateAndDropDatabaseCheck(nodeList []tidbast.StmtNode) []*storepb.PlanCheckRunResult_Result {
- var results []*storepb.PlanCheckRunResult_Result
- for _, node := range nodeList {
- switch node.(type) {
- case *tidbast.DropDatabaseStmt:
- results = append(results, &storepb.PlanCheckRunResult_Result{
- Status: storepb.PlanCheckRunResult_Result_ERROR,
- Code: common.TaskTypeDropDatabase.Int32(),
- Title: "Cannot drop database",
- Content: fmt.Sprintf(`The statement "%s" drops database`, node.Text()),
- })
- case *tidbast.CreateDatabaseStmt:
- results = append(results, &storepb.PlanCheckRunResult_Result{
- Status: storepb.PlanCheckRunResult_Result_ERROR,
- Code: common.TaskTypeCreateDatabase.Int32(),
- Title: "Cannot create database",
- Content: fmt.Sprintf(`The statement "%s" creates database`, node.Text()),
- })
- }
- }
-
- return results
-}
-
-func mysqlStatementTypeCheck(statement string) ([]*storepb.PlanCheckRunResult_Result, error) {
- stmts, err := mysqlparser.ParseMySQL(statement)
- if err != nil {
- // nolint:nilerr
- return []*storepb.PlanCheckRunResult_Result{
- {
- Status: storepb.PlanCheckRunResult_Result_ERROR,
- Code: 0,
- Title: "Syntax error",
- Content: err.Error(),
- Report: &storepb.PlanCheckRunResult_Result_SqlReviewReport_{
- SqlReviewReport: &storepb.PlanCheckRunResult_Result_SqlReviewReport{
- Line: 0,
- Detail: "",
- Code: advisor.StatementSyntaxError.Int32(),
- },
- },
- },
- }, nil
- }
-
- var results []*storepb.PlanCheckRunResult_Result
-
- // Disallow CREATE/DROP DATABASE statements.
- results = append(results, mysqlCreateAndDropDatabaseCheck(stmts)...)
-
- return results, nil
-}
-
-func mysqlCreateAndDropDatabaseCheck(stmtList []*mysqlparser.ParseResult) []*storepb.PlanCheckRunResult_Result {
- checker := &mysqlparser.CreateAndDropDatabaseChecker{}
- for _, stmt := range stmtList {
- antlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)
- }
-
- return checker.Results
-}
-
-func (e *StatementTypeExecutor) mysqlSDLTypeCheck(ctx context.Context, newSchema string, instance *store.InstanceMessage, database *store.DatabaseMessage) ([]*storepb.PlanCheckRunResult_Result, error) {
- ddl, err := runnerutils.ComputeDatabaseSchemaDiff(ctx, instance, database, e.dbFactory, newSchema)
- if err != nil {
- return nil, err
- }
-
- singleSQLs, err := base.SplitMultiSQL(storepb.Engine_MYSQL, ddl)
- if err != nil {
- return nil, errors.Wrapf(err, "failed to split SQL")
- }
- singleSQLs = base.FilterEmptySQL(singleSQLs)
-
- var results []*storepb.PlanCheckRunResult_Result
- for _, singleSQL := range singleSQLs {
- nodeList, err := mysqlparser.ParseMySQL(singleSQL.Text)
- if err != nil {
- return nil, errors.Wrapf(err, "failed to parse schema %q", singleSQL.Text)
- }
- if len(nodeList) != 1 {
- return nil, errors.Errorf("Expect one statement after splitting but found %d", len(nodeList))
- }
-
- checker := &mysqlparser.SDLTypeChecker{}
- antlr.ParseTreeWalkerDefault.Walk(checker, nodeList[0].Tree)
- }
-
- return results, nil
-}
-
-func tidbStatementTypeCheck(statement string, charset string, collation string) ([]*storepb.PlanCheckRunResult_Result, error) {
- p := tidbp.New()
- // To support MySQL8 window function syntax.
- // See https://github.com/bytebase/bytebase/issues/175.
- p.EnableWindowFunc(true)
-
- stmts, _, err := p.Parse(statement, charset, collation)
- if err != nil {
- // nolint: nilerr
- return []*storepb.PlanCheckRunResult_Result{
- {
- Status: storepb.PlanCheckRunResult_Result_ERROR,
- Title: "Syntax error",
- Content: err.Error(),
- Code: 0,
- Report: &storepb.PlanCheckRunResult_Result_SqlReviewReport_{
- SqlReviewReport: &storepb.PlanCheckRunResult_Result_SqlReviewReport{
- Line: 0,
- Detail: "",
- Code: advisor.StatementSyntaxError.Int32(),
- },
- },
- },
- }, nil
- }
-
- var results []*storepb.PlanCheckRunResult_Result
-
- // Disallow CREATE/DROP DATABASE statements.
- results = append(results, tidbCreateAndDropDatabaseCheck(stmts)...)
-
- return results, nil
-}
-
-func postgresqlCreateAndDropDatabaseCheck(nodeList []ast.Node) []*storepb.PlanCheckRunResult_Result {
- var result []*storepb.PlanCheckRunResult_Result
- for _, node := range nodeList {
- switch node.(type) {
- case *ast.DropDatabaseStmt:
- result = append(result, &storepb.PlanCheckRunResult_Result{
- Status: storepb.PlanCheckRunResult_Result_ERROR,
- Code: common.TaskTypeDropDatabase.Int32(),
- Title: "Cannot drop database",
- Content: fmt.Sprintf(`The statement "%s" drops database`, node.Text()),
- Report: nil,
- })
- case *ast.CreateDatabaseStmt:
- result = append(result, &storepb.PlanCheckRunResult_Result{
- Status: storepb.PlanCheckRunResult_Result_ERROR,
- Code: common.TaskTypeCreateDatabase.Int32(),
- Title: "Cannot create database",
- Content: fmt.Sprintf(`The statement "%s" creates database`, node.Text()),
- Report: nil,
- })
- }
- }
- return result
-}
-
-func postgresqlStatementTypeCheck(statement string) ([]*storepb.PlanCheckRunResult_Result, error) {
- stmts, err := pgrawparser.Parse(pgrawparser.ParseContext{}, statement)
- if err != nil {
- // nolint:nilerr
- return []*storepb.PlanCheckRunResult_Result{
- {
- Status: storepb.PlanCheckRunResult_Result_ERROR,
- Code: 0,
- Title: "Syntax error",
- Content: err.Error(),
- Report: &storepb.PlanCheckRunResult_Result_SqlReviewReport_{
- SqlReviewReport: &storepb.PlanCheckRunResult_Result_SqlReviewReport{
- Line: 0,
- Detail: "",
- Code: advisor.StatementSyntaxError.Int32(),
- },
- },
- },
- }, nil
- }
-
- var results []*storepb.PlanCheckRunResult_Result
-
- // Disallow CREATE/DROP DATABASE statements.
- results = append(results, postgresqlCreateAndDropDatabaseCheck(stmts)...)
-
- return results, nil
-}
diff --git a/backend/runner/plancheck/statement_type_executor_test.go b/backend/runner/plancheck/statement_type_executor_test.go
deleted file mode 100644
index 3e0e2878e7..0000000000
--- a/backend/runner/plancheck/statement_type_executor_test.go
+++ /dev/null
@@ -1,90 +0,0 @@
-package plancheck
-
-import (
- "io"
- "os"
- "path/filepath"
- "testing"
-
- "google.golang.org/protobuf/encoding/protojson"
- "google.golang.org/protobuf/testing/protocmp"
- "gopkg.in/yaml.v3"
-
- "github.com/google/go-cmp/cmp"
- "github.com/stretchr/testify/require"
-
- storepb "github.com/bytebase/bytebase/proto/generated-go/store"
-)
-
-type statementTypeCheckData struct {
- Statement string
- ChangeType storepb.PlanCheckRunConfig_ChangeDatabaseType
- Want []string
-}
-
-func TestMySQLStatementTypeCheck(t *testing.T) {
- tests := []string{
- "mysql_statement_type_check",
- }
-
- for _, test := range tests {
- runStatementTypeCheck(t, test, storepb.Engine_MYSQL, false /* record */)
- }
-}
-
-func runStatementTypeCheck(t *testing.T, file string, engineType storepb.Engine, record bool) {
- filepath := filepath.Join("test", file+".yaml")
- yamlFile, err := os.Open(filepath)
- require.NoError(t, err)
- defer yamlFile.Close()
-
- byteValue, err := io.ReadAll(yamlFile)
- require.NoError(t, err)
-
- tests := []statementTypeCheckData{}
- err = yaml.Unmarshal(byteValue, &tests)
- require.NoError(t, err)
-
- for i, test := range tests {
- var checkResults []*storepb.PlanCheckRunResult_Result
- var err error
- switch engineType {
- case storepb.Engine_MYSQL:
- checkResults, err = mysqlStatementTypeCheck(test.Statement)
- require.NoError(t, err)
- default:
- }
-
- if record {
- resultSet := []string{}
- for _, result := range checkResults {
- resultSet = append(resultSet, protojson.Format(result))
- }
- tests[i].Want = resultSet
- } else {
- want := []*storepb.PlanCheckRunResult_Result{}
- for _, result := range tests[i].Want {
- res := &storepb.PlanCheckRunResult_Result{}
- err := protojson.Unmarshal([]byte(result), res)
- require.NoError(t, err)
- want = append(want, res)
- }
- equalCheckRunResultProtos(t, want, checkResults, tests[i].Statement)
- }
- }
-
- if record {
- byteValue, err = yaml.Marshal(tests)
- require.NoError(t, err)
- err = os.WriteFile(filepath, byteValue, 0644)
- require.NoError(t, err)
- }
-}
-
-func equalCheckRunResultProtos(t *testing.T, want, got []*storepb.PlanCheckRunResult_Result, message string) {
- require.Equal(t, len(want), len(got))
- for i := 0; i < len(want); i++ {
- diff := cmp.Diff(want[i], got[i], protocmp.Transform())
- require.Equal(t, "", diff, message)
- }
-}
diff --git a/backend/server/server.go b/backend/server/server.go
index cefe7b0405..e74aecdd32 100644
--- a/backend/server/server.go
+++ b/backend/server/server.go
@@ -287,8 +287,6 @@ func NewServer(ctx context.Context, profile config.Profile) (*Server, error) {
s.planCheckScheduler = plancheck.NewScheduler(storeInstance, s.licenseService, s.stateCfg)
databaseConnectExecutor := plancheck.NewDatabaseConnectExecutor(storeInstance, s.dbFactory)
s.planCheckScheduler.Register(store.PlanCheckDatabaseConnect, databaseConnectExecutor)
- statementTypeExecutor := plancheck.NewStatementTypeExecutor(storeInstance, s.dbFactory)
- s.planCheckScheduler.Register(store.PlanCheckDatabaseStatementType, statementTypeExecutor)
statementAdviseExecutor := plancheck.NewStatementAdviseExecutor(storeInstance, s.dbFactory, s.licenseService)
s.planCheckScheduler.Register(store.PlanCheckDatabaseStatementAdvise, statementAdviseExecutor)
ghostSyncExecutor := plancheck.NewGhostSyncExecutor(storeInstance, s.secret)
diff --git a/backend/store/plan_check_run.go b/backend/store/plan_check_run.go
index 295f51fa97..aa1fb20568 100644
--- a/backend/store/plan_check_run.go
+++ b/backend/store/plan_check_run.go
@@ -22,8 +22,6 @@ const (
PlanCheckDatabaseStatementCompatibility PlanCheckRunType = "bb.plan-check.database.statement.compatibility"
// PlanCheckDatabaseStatementAdvise is the plan check type for schema system review policy.
PlanCheckDatabaseStatementAdvise PlanCheckRunType = "bb.plan-check.database.statement.advise"
- // PlanCheckDatabaseStatementType is the plan check type for statement type.
- PlanCheckDatabaseStatementType PlanCheckRunType = "bb.plan-check.database.statement.type"
// PlanCheckDatabaseStatementSummaryReport is the plan check type for statement summary report.
PlanCheckDatabaseStatementSummaryReport PlanCheckRunType = "bb.plan-check.database.statement.summary.report"
// PlanCheckDatabaseConnect is the plan check type for database connection.
diff --git a/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBadge.vue b/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBadge.vue
index ac73d087f0..ac9abd3d17 100644
--- a/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBadge.vue
+++ b/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBadge.vue
@@ -140,7 +140,6 @@ const PlanCheckRunTypeNameDict = new Map<PlanCheckRun_Type, string>([
"task.check-type.compatibility",
],
[PlanCheckRun_Type.DATABASE_STATEMENT_ADVISE, "task.check-type.sql-review"],
- [PlanCheckRun_Type.DATABASE_STATEMENT_TYPE, "task.check-type.statement-type"],
[PlanCheckRun_Type.DATABASE_CONNECT, "task.check-type.connection"],
[PlanCheckRun_Type.DATABASE_GHOST_SYNC, "task.check-type.ghost-sync"],
[
diff --git a/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBadgeBar.vue b/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBadgeBar.vue
index ea97f78b63..7e3f4cacb7 100644
--- a/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBadgeBar.vue
+++ b/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBadgeBar.vue
@@ -49,7 +49,6 @@ const planCheckRunsGroupByType = computed(() => {
const PlanCheckTypeOrderList: PlanCheckRun_Type[] = [
PlanCheckRun_Type.DATABASE_GHOST_SYNC,
PlanCheckRun_Type.DATABASE_STATEMENT_COMPATIBILITY,
- PlanCheckRun_Type.DATABASE_STATEMENT_TYPE,
PlanCheckRun_Type.DATABASE_CONNECT,
PlanCheckRun_Type.DATABASE_STATEMENT_ADVISE,
];
diff --git a/frontend/src/components/Plan/components/PlanCheckSection/PlanCheckBar/PlanCheckBadge.vue b/frontend/src/components/Plan/components/PlanCheckSection/PlanCheckBar/PlanCheckBadge.vue
index 7068f5b888..993ba0a803 100644
--- a/frontend/src/components/Plan/components/PlanCheckSection/PlanCheckBar/PlanCheckBadge.vue
+++ b/frontend/src/components/Plan/components/PlanCheckSection/PlanCheckBar/PlanCheckBadge.vue
@@ -133,7 +133,6 @@ const PlanCheckRunTypeNameDict = new Map<PlanCheckRun_Type, string>([
"task.check-type.compatibility",
],
[PlanCheckRun_Type.DATABASE_STATEMENT_ADVISE, "task.check-type.sql-review"],
- [PlanCheckRun_Type.DATABASE_STATEMENT_TYPE, "task.check-type.statement-type"],
[PlanCheckRun_Type.DATABASE_CONNECT, "task.check-type.connection"],
[PlanCheckRun_Type.DATABASE_GHOST_SYNC, "task.check-type.ghost-sync"],
[
diff --git a/frontend/src/components/Plan/components/PlanCheckSection/PlanCheckBar/PlanCheckBadgeBar.vue b/frontend/src/components/Plan/components/PlanCheckSection/PlanCheckBar/PlanCheckBadgeBar.vue
index a853ead435..c317f44310 100644
--- a/frontend/src/components/Plan/components/PlanCheckSection/PlanCheckBar/PlanCheckBadgeBar.vue
+++ b/frontend/src/components/Plan/components/PlanCheckSection/PlanCheckBar/PlanCheckBadgeBar.vue
@@ -48,7 +48,6 @@ const planCheckRunsGroupByType = computed(() => {
const PlanCheckTypeOrderList: PlanCheckRun_Type[] = [
PlanCheckRun_Type.DATABASE_STATEMENT_COMPATIBILITY,
- PlanCheckRun_Type.DATABASE_STATEMENT_TYPE,
PlanCheckRun_Type.DATABASE_CONNECT,
PlanCheckRun_Type.DATABASE_STATEMENT_ADVISE,
];
diff --git a/frontend/src/types/pipeline/task.ts b/frontend/src/types/pipeline/task.ts
index 222ebd663a..e1dd331c02 100644
--- a/frontend/src/types/pipeline/task.ts
+++ b/frontend/src/types/pipeline/task.ts
@@ -230,7 +230,6 @@ export type TaskCheckType =
| "bb.task-check.database.statement.syntax"
| "bb.task-check.database.statement.compatibility"
| "bb.task-check.database.statement.advise"
- | "bb.task-check.database.statement.type"
| "bb.task-check.database.connect"
| "bb.task-check.database.ghost.sync"
| "bb.task-check.issue.lgtm"
diff --git a/frontend/src/types/proto/v1/plan_service.ts b/frontend/src/types/proto/v1/plan_service.ts
index 4c272ea56d..06e75aee5a 100644
--- a/frontend/src/types/proto/v1/plan_service.ts
+++ b/frontend/src/types/proto/v1/plan_service.ts
@@ -440,7 +440,6 @@ export enum PlanCheckRun_Type {
DATABASE_STATEMENT_FAKE_ADVISE = "DATABASE_STATEMENT_FAKE_ADVISE",
DATABASE_STATEMENT_COMPATIBILITY = "DATABASE_STATEMENT_COMPATIBILITY",
DATABASE_STATEMENT_ADVISE = "DATABASE_STATEMENT_ADVISE",
- DATABASE_STATEMENT_TYPE = "DATABASE_STATEMENT_TYPE",
DATABASE_STATEMENT_SUMMARY_REPORT = "DATABASE_STATEMENT_SUMMARY_REPORT",
DATABASE_CONNECT = "DATABASE_CONNECT",
DATABASE_GHOST_SYNC = "DATABASE_GHOST_SYNC",
@@ -461,9 +460,6 @@ export function planCheckRun_TypeFromJSON(object: any): PlanCheckRun_Type {
case 3:
case "DATABASE_STATEMENT_ADVISE":
return PlanCheckRun_Type.DATABASE_STATEMENT_ADVISE;
- case 4:
- case "DATABASE_STATEMENT_TYPE":
- return PlanCheckRun_Type.DATABASE_STATEMENT_TYPE;
case 5:
case "DATABASE_STATEMENT_SUMMARY_REPORT":
return PlanCheckRun_Type.DATABASE_STATEMENT_SUMMARY_REPORT;
@@ -490,8 +486,6 @@ export function planCheckRun_TypeToJSON(object: PlanCheckRun_Type): string {
return "DATABASE_STATEMENT_COMPATIBILITY";
case PlanCheckRun_Type.DATABASE_STATEMENT_ADVISE:
return "DATABASE_STATEMENT_ADVISE";
- case PlanCheckRun_Type.DATABASE_STATEMENT_TYPE:
- return "DATABASE_STATEMENT_TYPE";
case PlanCheckRun_Type.DATABASE_STATEMENT_SUMMARY_REPORT:
return "DATABASE_STATEMENT_SUMMARY_REPORT";
case PlanCheckRun_Type.DATABASE_CONNECT:
@@ -514,8 +508,6 @@ export function planCheckRun_TypeToNumber(object: PlanCheckRun_Type): number {
return 2;
case PlanCheckRun_Type.DATABASE_STATEMENT_ADVISE:
return 3;
- case PlanCheckRun_Type.DATABASE_STATEMENT_TYPE:
- return 4;
case PlanCheckRun_Type.DATABASE_STATEMENT_SUMMARY_REPORT:
return 5;
case PlanCheckRun_Type.DATABASE_CONNECT:
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index 99244fe346..8fc770e539 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -11119,7 +11119,6 @@ components:
- DATABASE_STATEMENT_FAKE_ADVISE
- DATABASE_STATEMENT_COMPATIBILITY
- DATABASE_STATEMENT_ADVISE
- - DATABASE_STATEMENT_TYPE
- DATABASE_STATEMENT_SUMMARY_REPORT
- DATABASE_CONNECT
- DATABASE_GHOST_SYNC
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index e263bb43cf..4e6b7caf6b 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -6393,7 +6393,6 @@ Type is the database change type.
| DATABASE_STATEMENT_FAKE_ADVISE | 1 | |
| DATABASE_STATEMENT_COMPATIBILITY | 2 | |
| DATABASE_STATEMENT_ADVISE | 3 | |
-| DATABASE_STATEMENT_TYPE | 4 | |
| DATABASE_STATEMENT_SUMMARY_REPORT | 5 | |
| DATABASE_CONNECT | 6 | |
| DATABASE_GHOST_SYNC | 7 | |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index 77391646e5..126f3f66be 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -18194,12 +18194,6 @@ Format: projects/{project}/plans/{plan} </p></td>
<td><p></p></td>
</tr>
- <tr>
- <td>DATABASE_STATEMENT_TYPE</td>
- <td>4</td>
- <td><p></p></td>
- </tr>
-
<tr>
<td>DATABASE_STATEMENT_SUMMARY_REPORT</td>
<td>5</td>
diff --git a/proto/generated-go/v1/plan_service.pb.go b/proto/generated-go/v1/plan_service.pb.go
index b458a12d53..b8b9f8a962 100644
--- a/proto/generated-go/v1/plan_service.pb.go
+++ b/proto/generated-go/v1/plan_service.pb.go
@@ -96,7 +96,6 @@ const (
PlanCheckRun_DATABASE_STATEMENT_FAKE_ADVISE PlanCheckRun_Type = 1
PlanCheckRun_DATABASE_STATEMENT_COMPATIBILITY PlanCheckRun_Type = 2
PlanCheckRun_DATABASE_STATEMENT_ADVISE PlanCheckRun_Type = 3
- PlanCheckRun_DATABASE_STATEMENT_TYPE PlanCheckRun_Type = 4
PlanCheckRun_DATABASE_STATEMENT_SUMMARY_REPORT PlanCheckRun_Type = 5
PlanCheckRun_DATABASE_CONNECT PlanCheckRun_Type = 6
PlanCheckRun_DATABASE_GHOST_SYNC PlanCheckRun_Type = 7
@@ -109,7 +108,6 @@ var (
1: "DATABASE_STATEMENT_FAKE_ADVISE",
2: "DATABASE_STATEMENT_COMPATIBILITY",
3: "DATABASE_STATEMENT_ADVISE",
- 4: "DATABASE_STATEMENT_TYPE",
5: "DATABASE_STATEMENT_SUMMARY_REPORT",
6: "DATABASE_CONNECT",
7: "DATABASE_GHOST_SYNC",
@@ -119,7 +117,6 @@ var (
"DATABASE_STATEMENT_FAKE_ADVISE": 1,
"DATABASE_STATEMENT_COMPATIBILITY": 2,
"DATABASE_STATEMENT_ADVISE": 3,
- "DATABASE_STATEMENT_TYPE": 4,
"DATABASE_STATEMENT_SUMMARY_REPORT": 5,
"DATABASE_CONNECT": 6,
"DATABASE_GHOST_SYNC": 7,
@@ -2331,7 +2328,7 @@ var file_v1_plan_service_proto_rawDesc = []byte{
0x12, 0x18, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04,
0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x52, 0x75,
0x6e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x22, 0x85, 0x0b, 0x0a, 0x0c, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63,
+ 0x6e, 0x73, 0x65, 0x22, 0xe8, 0x0a, 0x0a, 0x0c, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63,
0x6b, 0x52, 0x75, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x32, 0x0a, 0x04, 0x74, 0x79,
@@ -2398,7 +2395,7 @@ var file_v1_plan_service_proto_rawDesc = []byte{
0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09,
0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x52,
0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53,
- 0x53, 0x10, 0x03, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0xf8, 0x01,
+ 0x53, 0x10, 0x03, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0xdb, 0x01,
0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55,
0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e,
0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x4d, 0x45,
@@ -2407,81 +2404,79 @@ var file_v1_plan_service_proto_rawDesc = []byte{
0x54, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x41, 0x54, 0x49, 0x42, 0x49,
0x4c, 0x49, 0x54, 0x59, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x19, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41,
0x53, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x44, 0x56,
- 0x49, 0x53, 0x45, 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53,
- 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45,
- 0x10, 0x04, 0x12, 0x25, 0x0a, 0x21, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x53,
- 0x54, 0x41, 0x54, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x55, 0x4d, 0x4d, 0x41, 0x52, 0x59,
- 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x52, 0x54, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x41, 0x54,
- 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x10, 0x06, 0x12,
- 0x17, 0x0a, 0x13, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x47, 0x48, 0x4f, 0x53,
- 0x54, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x07, 0x22, 0x51, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74,
- 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53,
- 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55,
- 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x4f, 0x4e, 0x45, 0x10,
- 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0c, 0x0a,
- 0x08, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x32, 0xbc, 0x07, 0x0a, 0x0b,
- 0x50, 0x6c, 0x61, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x07, 0x47,
- 0x65, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
- 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x22, 0x2c, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82,
- 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65,
- 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6c, 0x61, 0x6e,
- 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x7a, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e,
- 0x73, 0x12, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
- 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c,
- 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x22, 0x2e, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02,
- 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70,
- 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x73,
- 0x12, 0x87, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x6c, 0x61, 0x6e, 0x73,
- 0x12, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53,
- 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x1a, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
- 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x22, 0x35, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3,
- 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e,
+ 0x49, 0x53, 0x45, 0x10, 0x03, 0x12, 0x25, 0x0a, 0x21, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53,
+ 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x55, 0x4d, 0x4d,
+ 0x41, 0x52, 0x59, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x52, 0x54, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10,
+ 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54,
+ 0x10, 0x06, 0x12, 0x17, 0x0a, 0x13, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x47,
+ 0x48, 0x4f, 0x53, 0x54, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x07, 0x22, 0x51, 0x0a, 0x06, 0x53,
+ 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f,
+ 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a,
+ 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x4f,
+ 0x4e, 0x45, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x03,
+ 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x32, 0xbc,
+ 0x07, 0x0a, 0x0b, 0x50, 0x6c, 0x61, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67,
+ 0x0a, 0x07, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x22, 0x2c, 0xda, 0x41, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x70,
+ 0x6c, 0x61, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x7a, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x50,
+ 0x6c, 0x61, 0x6e, 0x73, 0x12, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x22, 0x2e, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3,
+ 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e,
0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x6c,
- 0x61, 0x6e, 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x7a, 0x0a, 0x0a, 0x43, 0x72,
- 0x65, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61,
- 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x22, 0x39, 0xda, 0x41, 0x0b,
- 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x70, 0x6c, 0x61, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02,
- 0x25, 0x3a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61,
+ 0x61, 0x6e, 0x73, 0x12, 0x87, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x6c,
+ 0x61, 0x6e, 0x73, 0x12, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e,
+ 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61,
0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d,
- 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x12, 0x84, 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74,
- 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
- 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
- 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x22, 0x43, 0xda, 0x41, 0x10, 0x70, 0x6c, 0x61,
- 0x6e, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4,
- 0x93, 0x02, 0x2a, 0x3a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x32, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x7b,
- 0x70, 0x6c, 0x61, 0x6e, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63,
- 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xa2, 0x01,
- 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52,
- 0x75, 0x6e, 0x73, 0x12, 0x25, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
- 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52,
- 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x62, 0x79, 0x74,
- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61,
- 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x22, 0x3e, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4,
- 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,
- 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6c, 0x61, 0x6e,
- 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75,
- 0x6e, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x0d, 0x52, 0x75, 0x6e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68,
- 0x65, 0x63, 0x6b, 0x73, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
- 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
+ 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x7a, 0x0a,
+ 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x1e, 0x2e, 0x62, 0x79,
+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x79,
+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x22, 0x39,
+ 0xda, 0x41, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x70, 0x6c, 0x61, 0x6e, 0x82, 0xd3,
+ 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f,
+ 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73,
+ 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x12, 0x84, 0x01, 0x0a, 0x0a, 0x55, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61,
+ 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x22, 0x43, 0xda, 0x41, 0x10,
+ 0x70, 0x6c, 0x61, 0x6e, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b,
+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x3a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x32, 0x22, 0x2f, 0x76,
+ 0x31, 0x2f, 0x7b, 0x70, 0x6c, 0x61, 0x6e, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f,
+ 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x2f, 0x2a, 0x7d,
+ 0x12, 0xa2, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65,
+ 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x73, 0x12, 0x25, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65,
+ 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74,
+ 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,
+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72,
+ 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x70,
+ 0x6c, 0x61, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63,
+ 0x6b, 0x52, 0x75, 0x6e, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x0d, 0x52, 0x75, 0x6e, 0x50, 0x6c, 0x61,
+ 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65,
- 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0xda, 0x41, 0x04,
- 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x3a, 0x01, 0x2a, 0x22, 0x2b, 0x2f,
- 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
- 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x75, 0x6e,
- 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65,
- 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x50, 0x6c, 0x61, 0x6e,
+ 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d,
+ 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x3a, 0x01, 0x2a,
+ 0x22, 0x2b, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a,
+ 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x3a,
+ 0x72, 0x75, 0x6e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x42, 0x11, 0x5a,
+ 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31,
+ 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
diff --git a/proto/v1/plan_service.proto b/proto/v1/plan_service.proto
index 1cadc05ffb..409e9dd55e 100644
--- a/proto/v1/plan_service.proto
+++ b/proto/v1/plan_service.proto
@@ -343,7 +343,6 @@ message PlanCheckRun {
DATABASE_STATEMENT_FAKE_ADVISE = 1;
DATABASE_STATEMENT_COMPATIBILITY = 2;
DATABASE_STATEMENT_ADVISE = 3;
- DATABASE_STATEMENT_TYPE = 4;
DATABASE_STATEMENT_SUMMARY_REPORT = 5;
DATABASE_CONNECT = 6;
DATABASE_GHOST_SYNC = 7;