Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: typo (#4094)
p0ny0cce0f89eade
diff --git a/server/runner/schemasync/syncer.go b/server/runner/schemasync/syncer.goindex 99599e35e6..83a302e0f5 100644--- a/server/runner/schemasync/syncer.go+++ b/server/runner/schemasync/syncer.go@@ -427,7 +427,7 @@ func syncDBSchema(ctx context.Context, stores *store.Store, database *api.Databa}if err := stores.UpsertDBSchema(ctx, store.DBSchemaUpsert{- UpdatorID: api.SystemBotID,+ UpdaterID: api.SystemBotID,DatabaseID: database.ID,Metadata: databaseMetadata,RawDump: rawDump,diff --git a/server/webhook.go b/server/webhook.goindex dff08c6ffc..a89d0666f3 100644--- a/server/webhook.go+++ b/server/webhook.go@@ -259,7 +259,7 @@ func (s *Server) registerWebhookRoutes(g *echo.Group) {response := &api.VCSSQLReviewResult{}switch repo.VCS.Type {case vcs.GitHubCom:- response = convertSQLAdiceToGitHubActionResult(sqlCheckAdvice)+ response = convertSQLAdviceToGitHubActionResult(sqlCheckAdvice)case vcs.GitLabSelfHost:response = convertSQLAdviceToGitLabCIResult(sqlCheckAdvice)}@@ -1256,10 +1256,10 @@ func convertSQLAdviceToGitLabCIResult(adviceMap map[string][]advisor.Advice) *ap}}-// convertSQLAdiceToGitHubActionResult will convert SQL advice map to GitHub action output format.+// convertSQLAdviceToGitHubActionResult will convert SQL advice map to GitHub action output format.// GitHub action output message: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions// nolint:unused-func convertSQLAdiceToGitHubActionResult(adviceMap map[string][]advisor.Advice) *api.VCSSQLReviewResult {+func convertSQLAdviceToGitHubActionResult(adviceMap map[string][]advisor.Advice) *api.VCSSQLReviewResult {messageList := []string{}status := advisor.Successdiff --git a/server/webhook_test.go b/server/webhook_test.goindex b9f1980759..c3e7f233e7 100644--- a/server/webhook_test.go+++ b/server/webhook_test.go@@ -178,7 +178,7 @@ func TestVCSSQLReview_ConvertSQLAdviceToGitHubActionResult(t *testing.T) {"::warning file=file2.sql,line=1,col=1,endColumn=2,title=naming.table (301)::\"techBook\" mismatches table naming convention, naming format should be \"^[a-z]+(_[a-z]+)*$\"%0ADoc: https://www.bytebase.com/docs/reference/error-code/advisor#301","::error file=file2.sql,line=4,col=1,endColumn=2,title=naming.index.uk (304)::Unique key in table \"tech_book\" mismatches the naming convention, expect \"^$|^uk_tech_book_id_name$\" but found \"tech_book_id_name\"%0ADoc: https://www.bytebase.com/docs/reference/error-code/advisor#304",}- res := convertSQLAdiceToGitHubActionResult(mockSQLAdviceMap)+ res := convertSQLAdviceToGitHubActionResult(mockSQLAdviceMap)assert.Equal(t, advisor.Error, res.Status)assert.Equal(t, 4, len(res.Content))assert.Equal(t, expect, res.Content)diff --git a/store/db_schema.go b/store/db_schema.goindex ff993b36b5..3f410357da 100644--- a/store/db_schema.go+++ b/store/db_schema.go@@ -22,7 +22,7 @@ type DBSchema struct {type DBSchemaUpsert struct {// Standard fields// Value is assigned from the jwt subject field passed by the client.- UpdatorID int+ UpdaterID int// Related fieldsDatabaseID int@@ -130,8 +130,8 @@ func (s *Store) UpsertDBSchema(ctx context.Context, upsert DBSchemaUpsert) errorvar raw dbSchemaRawif err := tx.QueryRowContext(ctx, query,- upsert.UpdatorID,- upsert.UpdatorID,+ upsert.UpdaterID,+ upsert.UpdaterID,upsert.DatabaseID,metadataBytes,upsert.RawDump,