Skip to content

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

chore: enable sql review policy for all plans (#4318)

ecmadao3d7d21134a57
diff --git a/api/plan.go b/api/plan.go
index 30551d884f..1a23633008 100644
--- a/api/plan.go
+++ b/api/plan.go
@@ -227,7 +227,7 @@ var featureMatrix = map[FeatureType][3]bool{
FeatureMultiTenancy: {false, false, true},
FeatureOnlineMigration: {false, true, true},
FeatureSchemaDrift: {false, true, true},
- FeatureSQLReview: {false, true, true},
+ FeatureSQLReview: {true, true, true},
FeatureTaskScheduleTime: {false, true, true},
FeatureVCSSQLReviewWorkflow: {false, false, true},
// Database management
diff --git a/frontend/src/types/plan.ts b/frontend/src/types/plan.ts
index e9983947cc..0f272f182c 100644
--- a/frontend/src/types/plan.ts
+++ b/frontend/src/types/plan.ts
@@ -90,7 +90,7 @@ export const FEATURE_MATRIX: Map<FeatureType, boolean[]> = new Map([
["bb.feature.multi-tenancy", [false, false, true]],
["bb.feature.online-migration", [false, true, true]],
["bb.feature.schema-drift", [false, true, true]],
- ["bb.feature.sql-review", [false, true, true]],
+ ["bb.feature.sql-review", [true, true, true]],
["bb.feature.task-schedule-time", [false, true, true]],
["bb.feature.vcs-sql-review", [false, false, true]],
// Database management
diff --git a/frontend/src/types/plan.yaml b/frontend/src/types/plan.yaml
index 387c20fd63..ff41ae84a3 100644
--- a/frontend/src/types/plan.yaml
+++ b/frontend/src/types/plan.yaml
@@ -63,8 +63,8 @@ planList:
tooltip: disaster-recovery-basic-tooltip
- type: archiving
- type: sql-check
- content: sql-check-basic
- tooltip: sql-check-basic-tooltip
+ content: sql-check-advanced
+ tooltip: sql-check-advanced-tooltip
- type: anomaly-detection
content: anomaly-detection-basic
tooltip: anomaly-detection-basic-tooltip
diff --git a/frontend/src/types/sqlReview.ts b/frontend/src/types/sqlReview.ts
index e4e3525ed1..3b2ea48b82 100644
--- a/frontend/src/types/sqlReview.ts
+++ b/frontend/src/types/sqlReview.ts
@@ -141,11 +141,6 @@ export type RuleType =
| "index.total-number-limit"
| "index.pk-type-limit";
-export const availableRulesForFreePlan: RuleType[] = [
- "statement.where.require",
- "column.no-null",
-];
-
// The naming format rule payload.
// Used by the backend.
interface NamingFormatPayload {
@@ -660,12 +655,11 @@ export const getRuleLocalization = (
};
};
+// We decide to make the SQL review policy free to use for all plans in issue BYT-2321.
+// Return true to ignore the feature guard for SQL review rules.
export const ruleIsAvailableInSubscription = (
ruleType: RuleType,
subscriptionPlan: PlanType
): boolean => {
- if (subscriptionPlan === PlanType.FREE) {
- return availableRulesForFreePlan.indexOf(ruleType) >= 0;
- }
return true;
};