Skip to content

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

fix: pass DBSchema (#11955)

p0ny23e8654e990a
diff --git a/backend/runner/plancheck/statement_advise_executor.go b/backend/runner/plancheck/statement_advise_executor.go
index 7c8462a83c..a8116c8eae 100644
--- a/backend/runner/plancheck/statement_advise_executor.go
+++ b/backend/runner/plancheck/statement_advise_executor.go
@@ -379,6 +379,7 @@ func (e *StatementAdviseExecutor) runForDatabaseGroupTarget(ctx context.Context,
adviceList, err := advisor.SQLReviewCheck(renderedStatement, policy.RuleList, advisor.SQLReviewCheckContext{
Charset: dbSchema.GetMetadata().CharacterSet,
Collation: dbSchema.GetMetadata().Collation,
+ DBSchema: dbSchema.GetMetadata(),
ChangeType: changeType,
DbType: instance.Engine,
Catalog: catalog,