Skip to content

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

chore: sql review is available without instance license (#7841)

ecmadao4267b31d8237
diff --git a/backend/legacyapi/plan.go b/backend/legacyapi/plan.go
index 8554692630..9b0c44b419 100644
--- a/backend/legacyapi/plan.go
+++ b/backend/legacyapi/plan.go
@@ -341,7 +341,6 @@ var InstanceLimitFeature = map[FeatureType]bool{
// Change Workflow
FeatureIMApproval: true,
FeatureSchemaDrift: true,
- FeatureSQLReview: true,
FeatureEncryptedSecrets: true,
FeatureTaskScheduleTime: true,
FeatureOnlineMigration: true,
diff --git a/backend/runner/plancheck/statement_advise_executor.go b/backend/runner/plancheck/statement_advise_executor.go
index 9a8d57ad15..b552d47412 100644
--- a/backend/runner/plancheck/statement_advise_executor.go
+++ b/backend/runner/plancheck/statement_advise_executor.go
@@ -94,7 +94,7 @@ func (e *StatementAdviseExecutor) runForDatabaseTarget(ctx context.Context, plan
return nil, errors.Errorf("environment %q not found", database.EffectiveEnvironmentID)
}
- if err := e.licenseService.IsFeatureEnabledForInstance(api.FeatureSQLReview, instance); err != nil {
+ if err := e.licenseService.IsFeatureEnabled(api.FeatureSQLReview); err != nil {
// nolint:nilerr
return []*storepb.PlanCheckRunResult_Result{
{
@@ -315,7 +315,7 @@ func (e *StatementAdviseExecutor) runForDatabaseGroupTarget(ctx context.Context,
return nil, errors.Errorf("environment %q not found", db.EffectiveEnvironmentID)
}
- if err := e.licenseService.IsFeatureEnabledForInstance(api.FeatureSQLReview, instance); err != nil {
+ if err := e.licenseService.IsFeatureEnabled(api.FeatureSQLReview); err != nil {
// nolint:nilerr
return []*storepb.PlanCheckRunResult_Result{
{
diff --git a/backend/runner/taskcheck/statement_advisor_composite_executor.go b/backend/runner/taskcheck/statement_advisor_composite_executor.go
index 8e839eeeff..151bb87c69 100644
--- a/backend/runner/taskcheck/statement_advisor_composite_executor.go
+++ b/backend/runner/taskcheck/statement_advisor_composite_executor.go
@@ -70,7 +70,7 @@ func (e *StatementAdvisorCompositeExecutor) Run(ctx context.Context, taskCheckRu
if instance == nil {
return nil, errors.Errorf("instance %q not found", task.InstanceID)
}
- if err := e.licenseService.IsFeatureEnabledForInstance(api.FeatureSQLReview, instance); err != nil {
+ if err := e.licenseService.IsFeatureEnabled(api.FeatureSQLReview); err != nil {
// nolint:nilerr
return []api.TaskCheckResult{
{
diff --git a/frontend/src/components/PagedActivityTable.vue b/frontend/src/components/PagedActivityTable.vue
index 8951a3deef..0c0764a3a7 100644
--- a/frontend/src/components/PagedActivityTable.vue
+++ b/frontend/src/components/PagedActivityTable.vue
@@ -135,15 +135,16 @@ const fetchData = async (refresh = false) => {
state.auditLogList.push(...logEntities);
}
- if (logEntities.length < expectedRowCount) {
- state.hasMore = false;
- } else if (!isFirstFetch) {
+ if (!isFirstFetch && logEntities.length === expectedRowCount) {
// If we didn't reach the end, memorize we've clicked the "load more" button.
sessionState.value.page++;
}
sessionState.value.updatedTs = Date.now();
state.paginationToken = nextPageToken;
+ if (!nextPageToken) {
+ state.hasMore = false;
+ }
} catch (e) {
console.error(e);
} finally {
diff --git a/frontend/src/types/plan.ts b/frontend/src/types/plan.ts
index 5aa7302720..c54a2c3ccb 100644
--- a/frontend/src/types/plan.ts
+++ b/frontend/src/types/plan.ts
@@ -60,7 +60,6 @@ export const instanceLimitFeature = new Set<FeatureType>([
"bb.feature.im.approval",
"bb.feature.schema-drift",
"bb.feature.encrypted-secrets",
- "bb.feature.sql-review",
"bb.feature.task-schedule-time",
"bb.feature.online-migration",
// Database Management