Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
refactoring: rename schema-review to sql-review (#2136)
Danny Xu3851b67a819e
diff --git a/api/policy.go b/api/policy.goindex a908204e26..f41caa38ec 100644--- a/api/policy.go+++ b/api/policy.go@@ -110,7 +110,7 @@ type PolicyDelete struct {// Domain specific fields// Type is the policy type.- // Currently we only support delete operation for "bb.policy.schema-review", need it here for validation and update query.+ // Currently we only support delete operation for "bb.policy.sql-review", need it here for validation and update query.Type PolicyType}diff --git a/frontend/src/store/modules/sqlReview.ts b/frontend/src/store/modules/sqlReview.tsindex 7f2d7c2881..7352153d31 100644--- a/frontend/src/store/modules/sqlReview.ts+++ b/frontend/src/store/modules/sqlReview.ts@@ -19,7 +19,7 @@ import { usePolicyStore } from "./policy";const convertToSQLReviewPolicy = (policy: Policy): SQLReviewPolicy | undefined => {- if (policy.type !== "bb.policy.schema-review") {+ if (policy.type !== "bb.policy.sql-review") {return;}const payload = policy.payload as SQLReviewPolicyPayload;@@ -120,7 +120,7 @@ export const useSQLReviewStore = defineStore("sqlReview", {const policyStore = usePolicyStore();const policy = await policyStore.upsertPolicyByEnvironmentAndType({environmentId,- type: "bb.policy.schema-review",+ type: "bb.policy.sql-review",policyUpsert: { payload },});@@ -141,7 +141,7 @@ export const useSQLReviewStore = defineStore("sqlReview", {const policyStore = usePolicyStore();await policyStore.deletePolicyByEnvironmentAndType({environmentId: targetPolicy.environment.id,- type: "bb.policy.schema-review",+ type: "bb.policy.sql-review",});pullAt(this.reviewPolicyList, index);@@ -182,7 +182,7 @@ export const useSQLReviewStore = defineStore("sqlReview", {const policyStore = usePolicyStore();const policy = await policyStore.upsertPolicyByEnvironmentAndType({environmentId: targetPolicy.environment.id,- type: "bb.policy.schema-review",+ type: "bb.policy.sql-review",policyUpsert,});@@ -211,7 +211,7 @@ export const useSQLReviewStore = defineStore("sqlReview", {async fetchReviewPolicyList(): Promise<SQLReviewPolicy[]> {const policyStore = usePolicyStore();const policyList = await policyStore.fetchPolicyListByType(- "bb.policy.schema-review"+ "bb.policy.sql-review");const reviewPolicyList = policyList.reduce((list, policy) => {@@ -230,7 +230,7 @@ export const useSQLReviewStore = defineStore("sqlReview", {const policyStore = usePolicyStore();const policy = await policyStore.fetchPolicyByEnvironmentAndType({environmentId: environmentId,- type: "bb.policy.schema-review",+ type: "bb.policy.sql-review",});if (!policy) {diff --git a/frontend/src/types/policy.ts b/frontend/src/types/policy.tsindex 883b7d6372..87a58f947b 100644--- a/frontend/src/types/policy.ts+++ b/frontend/src/types/policy.ts@@ -10,7 +10,7 @@ import {export type PolicyType =| "bb.policy.pipeline-approval"| "bb.policy.backup-plan"- | "bb.policy.schema-review";+ | "bb.policy.sql-review";export type PipelineApprovalPolicyValue =| "MANUAL_APPROVAL_NEVER"