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: feature matrix for sync schema (#3372)
boojack8427569f5e25
diff --git a/api/plan.go b/api/plan.goindex 1789c3aded..b13415fc0b 100644--- a/api/plan.go+++ b/api/plan.go@@ -121,8 +121,8 @@ const (// FeatureReadReplicaConnection allows user to set a read replica connection// including host and port to data source.FeatureReadReplicaConnection FeatureType = "bb.feature.read-replica-connection"- // FeatureSyncSchema allows user to sync the base database schema into target database.- FeatureSyncSchema FeatureType = "bb.feature.sync-schema"+ // FeatureSyncSchemaAllVersions allows user to sync the base database schema all versions into target database.+ FeatureSyncSchemaAllVersions FeatureType = "bb.feature.sync-schema-all-versions"// Policy Control.@@ -179,8 +179,8 @@ func (e FeatureType) Name() string {return "Point-in-time Recovery"case FeatureReadReplicaConnection:return "Read replica connection"- case FeatureSyncSchema:- return "Synchronize Schema"+ case FeatureSyncSchemaAllVersions:+ return "Synchronize schema all versions"// Policy Controlcase FeatureApprovalPolicy:return "Approval policy"@@ -283,9 +283,9 @@ var featureMatrix = map[FeatureType]featureConfig{enabled: true,planToggle: [3]bool{false, false, true},},- FeatureSyncSchema: {+ FeatureSyncSchemaAllVersions: {enabled: true,- planToggle: [3]bool{true, true, true},+ planToggle: [3]bool{false, false, true},},// Policy ControlFeatureApprovalPolicy: {diff --git a/frontend/src/components/SyncDatabaseSchemaPrepForm.vue b/frontend/src/components/SyncDatabaseSchemaPrepForm.vueindex 5e5eec5856..b5d65cf5ec 100644--- a/frontend/src/components/SyncDatabaseSchemaPrepForm.vue+++ b/frontend/src/components/SyncDatabaseSchemaPrepForm.vue@@ -226,7 +226,7 @@<FeatureModalv-if="state.showFeatureModal"- feature="bb.feature.sync-schema"+ feature="bb.feature.sync-schema-all-versions"@cancel="state.showFeatureModal = false"/></template>@@ -313,7 +313,7 @@ const state = reactive<LocalState>({});const hasSyncSchemaFeature = computed(() => {- return hasFeature("bb.feature.sync-schema");+ return hasFeature("bb.feature.sync-schema-all-versions");});const allowSelectProject = computed(() => {diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex 638a0efb83..27f25f5e16 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -1471,8 +1471,8 @@"title": "Point-in-Time-Recovery (PITR)","desc": "Restore the database state to a point in time."},- "bb-feature-sync-schema": {- "title": "Synchronize Schema",+ "bb-feature-sync-schema-all-versions": {+ "title": "Synchronize schema all versions","desc": "Select any arbitrary migration version from the base database and synchronize it to the target database."},"bb-feature-read-replica-connection": {diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 931325bda8..0c3d032a04 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -1471,7 +1471,7 @@"title": "恢复到指定时间点 (PITR)","desc": "将数据库的状态恢复到一个时间点。"},- "bb-feature-sync-schema": {+ "bb-feature-sync-schema-all-versions": {"title": "库表同步","desc": "选择某个数据库的任意一个 Schema 版本,并将其同步到目标数据库。"},diff --git a/frontend/src/types/plan.ts b/frontend/src/types/plan.tsindex 76f652db56..46c928ba1c 100644--- a/frontend/src/types/plan.ts+++ b/frontend/src/types/plan.ts@@ -22,7 +22,7 @@ export type FeatureType =// Database management| "bb.feature.pitr"| "bb.feature.read-replica-connection"- | "bb.feature.sync-schema"+ | "bb.feature.sync-schema-all-versions"// Policy Control| "bb.feature.approval-policy"| "bb.feature.backup-policy"@@ -94,7 +94,10 @@ export const FEATURE_MATRIX: Map<FeatureType, boolean[]> = new Map([// Database management["bb.feature.pitr", [false, true, true]],["bb.feature.read-replica-connection", [false, false, true]],- ["bb.feature.sync-schema", [true, true, true]],+ // This feature type is specifically means that all schema versions can be selected.+ // Sync schema is free to all plans. But in non-enterprise plan, we only show the+ // latest schema version and it's not selectable.+ ["bb.feature.sync-schema-all-versions", [false, false, true]],// Policy Control["bb.feature.approval-policy", [false, true, true]],["bb.feature.backup-policy", [false, true, true]],