Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat: update sync schema dialog (#3100)
boojack4a1e4dc889df
diff --git a/frontend/src/components/SyncDatabaseSchemaPrepForm.vue b/frontend/src/components/SyncDatabaseSchemaPrepForm.vueindex 090ad1b153..f62c1880b4 100644--- a/frontend/src/components/SyncDatabaseSchemaPrepForm.vue+++ b/frontend/src/components/SyncDatabaseSchemaPrepForm.vue@@ -24,7 +24,7 @@<divclass="w-full mt-4 mb-2 flex flex-row justify-start items-center">- <span>{{ $t("database.sync-schema.base-database") }}</span>+ <span>{{ $t("database.sync-schema.select-schema") }}</span></div><divclass="w-full flex flex-row justify-start items-center px-px relative"@@ -51,6 +51,7 @@:environment-id="state.baseSchemaInfo.environmentId":project-id="state.projectId":customize-item="true"+ :engine-type="state.engineType"@select-database-id="(databaseId: DatabaseId) => {state.baseSchemaInfo.databaseId = databaseId;@@ -140,8 +141,8 @@<div class="flex items-center"><InstanceEngineIcon :instance="database.instance" /><span class="mx-2">{{ database.name }}</span>- <span class="text-gray-500">{{- head(databaseMigrationHistoryList(database.id))?.version+ <span class="text-gray-400">{{+ database.instance.name}}</span></div></template>@@ -154,11 +155,11 @@<!-- Schema diff statement editor container --><div class="w-full flex flex-col justify-start items-start"><div class="w-full flex flex-row justify-start items-center mb-2">- <span>{{ $t("database.sync-schema.schema-comparison-result") }}</span>+ <span>{{ $t("database.sync-schema.schema-diff") }}</span></div><div v-if="!shouldShowDiff" class="w-full border px-4 py-4"><p class="w-full text-left py-2">- {{ $t("database.sync-schema.select-base-and-target-database-tip") }}+ {{ $t("database.sync-schema.select-schema-and-target-database-tip") }}</p></div><template v-else>@@ -243,7 +244,6 @@<script lang="ts" setup>import axios from "axios";import dayjs from "dayjs";-import { head } from "lodash-es";import { computed, reactive, ref, watch } from "vue";import { useEventListener } from "@vueuse/core";import { useRouter } from "vue-router";@@ -315,6 +315,7 @@ useEventListener(window, "keydown", (e) => {const state = reactive<LocalState>({projectId: props.projectId,+ engineType: "MYSQL",baseSchemaInfo: {},targetSchemaInfo: {},recommandStatement: "",@@ -504,14 +505,11 @@ watch(if (isValidId(databaseId)) {const database = databaseStore.getDatabaseById(databaseId as DatabaseId);if (database) {- state.engineType = database.instance.engine;await instanceStore.fetchMigrationHistory({instanceId: database.instance.id,databaseName: database.name,});}- } else {- state.engineType = undefined;}state.baseSchemaInfo.migrationHistory = undefined;}diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex 177af8eb6f..aa2f13b54b 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -904,13 +904,13 @@"selected-n-databases": "{n} database selected | {n} databases selected","sync-schema": {"title": "Synchronize Schema",- "description": "Synchronize schema from the base database to target database with selected migration version.",- "base-database": "Base database",- "target-database": "Target database",- "synchronize-statements": "The SQL statements to synchronize",- "schema-comparison-result": "The schema comparison result",- "select-base-and-target-database-tip": "Please select the base and target database firstly",- "no-difference-tip": "There is no difference between the base and target database schema."+ "description": "Synchronize the selected schema to target database.",+ "select-schema": "Select Schema",+ "target-database": "Database",+ "schema-diff": "Schema diff",+ "synchronize-statements": "The generated DDL statements",+ "select-schema-and-target-database-tip": "Please select the schema and database firstly.",+ "no-difference-tip": "There is no difference between the selected schema and target database schema."}},"repository": {diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 6b12a038cf..4c6a227d39 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -904,13 +904,13 @@"selected-n-databases": "已选择 {n} 个数据库","sync-schema": {"title": "库表同步",- "description": "将选定的源数据库 Schema 版本同步到目标数据库。",- "base-database": "源数据库",+ "description": "将选定的 Schema 同步到目标数据库。",+ "select-schema": "选择 Schema","target-database": "目标数据库",+ "schema-diff": "Schema 比较结果","synchronize-statements": "生成的 Schema DDL 语句",- "schema-comparison-result": "Schema 比较结果",- "select-base-and-target-database-tip": "请先选择源数据库和目标数据库",- "no-difference-tip": "源数据库与目标数据库之间之间没有 Schema 区别。"+ "select-schema-and-target-database-tip": "请先选择 Schema 和目标数据库",+ "no-difference-tip": "选定的 Schema 与目标数据库 Schema 之间没有区别。"}},"repository": {