Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore(frontend): update VCS config wordings for SDL (#5118)
Liu Jia00141676fa1
diff --git a/frontend/src/components/RepositoryForm.vue b/frontend/src/components/RepositoryForm.vueindex ce37c0ec62..fa2ac7cbb5 100644--- a/frontend/src/components/RepositoryForm.vue+++ b/frontend/src/components/RepositoryForm.vue@@ -91,12 +91,14 @@"><template #menuItem="{ item }">- {{- $t(- `project.settings.select-schema-change-type-${item.toLowerCase()}`- )- }}- <BBBetaBadge v-if="item === 'SDL'" />+ <div class="flex items-center gap-x-2">+ {{+ $t(+ `project.settings.select-schema-change-type-${item.toLowerCase()}`+ )+ }}+ <BBBetaBadge v-if="item === 'SDL'" class="!leading-3" />+ </div></template></BBSelect></div>@@ -200,7 +202,9 @@/><div v-if="schemaTagPlaceholder" class="mt-2 textinfolabel"><span class="text-red-600">*</span>- <span class="ml-1">{{ $t("repository.if-specified") }},</span>+ <span v-if="isProjectSchemaChangeTypeDDL" class="ml-1">+ {{ $t("repository.if-specified") }},+ </span><span class="ml-1">{{ schemaTagPlaceholder }}</span></div><divdiff --git a/frontend/src/components/RepositoryPanel.vue b/frontend/src/components/RepositoryPanel.vueindex 8dda4705fd..625da943bc 100644--- a/frontend/src/components/RepositoryPanel.vue+++ b/frontend/src/components/RepositoryPanel.vue@@ -7,40 +7,73 @@</i18n-t></div><div class="mt-2 textinfolabel">- <i18n-t keypath="repository.gitops-description-file-path">- <template #fullPath>- <a class="normal-link" :href="repository.webUrl" target="_blank">{{- repository.fullPath- }}</a>- </template>- <template #fullPathTemplate>- <span class="font-medium text-main"- >{{ state.repositoryConfig.baseDirectory }}/{{- state.repositoryConfig.filePathTemplate- }}</span- >- </template>- </i18n-t>- <span> </span>- <i18n-t keypath="repository.gitops-description-branch">- <template #branch>- <span class="font-medium text-main">- <template v-if="state.repositoryConfig.branchFilter">- {{ state.repositoryConfig.branchFilter }}- </template>- <template v-else>- {{ $t("common.default") }}+ <template v-if="isProjectSchemaChangeTypeDDL">+ <i18n-t keypath="repository.gitops-description-file-path">+ <template #fullPath>+ <a class="normal-link" :href="repository.webUrl" target="_blank">{{+ repository.fullPath+ }}</a>+ </template>+ <template #fullPathTemplate>+ <span class="font-medium text-main"+ >{{ state.repositoryConfig.baseDirectory }}/{{+ state.repositoryConfig.filePathTemplate+ }}</span+ >+ </template>+ </i18n-t>+ <span> </span>+ <i18n-t keypath="repository.gitops-description-branch">+ <template #branch>+ <span class="font-medium text-main">+ <template v-if="state.repositoryConfig.branchFilter">+ {{ state.repositoryConfig.branchFilter }}+ </template>+ <template v-else>+ {{ $t("common.default") }}+ </template>+ </span>+ </template>+ </i18n-t>+ <template v-if="state.repositoryConfig.schemaPathTemplate">+ <span> </span>+ <i18n-t keypath="repository.gitops-description-description-schema-path">+ <template #schemaPathTemplate>+ <span class="font-medium text-main">{{+ state.repositoryConfig.schemaPathTemplate+ }}</span></template>- </span>+ </i18n-t></template>- </i18n-t>- <template v-if="state.repositoryConfig.schemaPathTemplate">- <span> </span>- <i18n-t keypath="repository.gitops-description-description-schema-path">+ </template>+ <template v-if="isProjectSchemaChangeTypeSDL">+ <i18n-t keypath="repository.gitops-description-sdl">+ <template #fullPath>+ <a class="normal-link" :href="repository.webUrl" target="_blank">+ {{ repository.fullPath }}+ </a>+ </template>+ <template #branch>+ <span class="font-medium text-main">+ <template v-if="state.repositoryConfig.branchFilter">+ {{ state.repositoryConfig.branchFilter }}+ </template>+ <template v-else>+ {{ $t("common.default") }}+ </template>+ </span>+ </template>+ <template #filePathTemplate>+ <span class="font-medium text-main">+ {{ state.repositoryConfig.baseDirectory }}/{{+ state.repositoryConfig.filePathTemplate+ }}+ </span>+ </template><template #schemaPathTemplate>- <span class="font-medium text-main">{{- state.repositoryConfig.schemaPathTemplate- }}</span>+ <span class="font-medium text-main">+ {{ state.repositoryConfig.schemaPathTemplate }}+ </span></template></i18n-t></template>@@ -324,6 +357,14 @@ export default defineComponent({};});+ const isProjectSchemaChangeTypeDDL = computed(() => {+ return state.schemaChangeType === "DDL";+ });++ const isProjectSchemaChangeTypeSDL = computed(() => {+ return state.schemaChangeType === "SDL";+ });+const allowUpdate = computed(() => {return (!isEmpty(state.repositoryConfig.branchFilter) &&@@ -490,6 +531,8 @@ export default defineComponent({state,repositoryInfo,allowUpdate,+ isProjectSchemaChangeTypeDDL,+ isProjectSchemaChangeTypeSDL,restoreToUIWorkflowType,onSQLReviewCIModalClose,doUpdate,diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex 7a81a56108..03cc8057a8 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -1142,6 +1142,7 @@"gitops-description-file-path": "Database migration scripts are stored in {fullPath}. To make schema changes, a developer would create a migration script matching file path pattern {fullPathTemplate}.","gitops-description-branch": "After the script is review approved and merged into the {branch} branch, Bytebase will automatically kicks off the pipeline to apply the new schema change.","gitops-description-description-schema-path": "After applying the schema change, Bytebase will also write the latest schema to the specified schema path location {schemaPathTemplate}.",+ "gitops-description-sdl": "Database migration scripts are stored in {fullPath}. To make schema changes, a developer would modify the full schema script matching file path pattern {schemaPathTemplate}. To make data changes, a developer would create a migration script matching file path pattern {filePathTemplate}. Once the script is merged into the {branch} branch, Bytebase will automatically kick off the pipeline to apply the new database change.","restore-to-ui-workflow": "Restore to UI workflow","restore-ui-workflow-description": "When using the UI workflow, the developer submits a SQL review ticket directly from Bytebase console and waits for the assigned DBA or peer developer to review. Bytebase applies the SQL change after review approved.","restore-ui-workflow-success": "Successfully restored to UI workflow",@@ -1294,9 +1295,9 @@"btn-text": "Restore this @.lower:{'common.project'}"},"schema-change-type": "Schema change type",- "select-schema-change-type-ddl": "Migration-based",- "select-schema-change-type-sdl": "State-based",- "schema-path-template-sdl-description": "The schema file that contains the desired state of the database schema. Bytebase creates new migrations for any discrepancy found between the desired state and the actual database schema."+ "select-schema-change-type-ddl": "Imperative - Migration-based migration. E.g., ALTER TABLE",+ "select-schema-change-type-sdl": "Declarative - State-based migration. E.g., CREATE TABLE",+ "schema-path-template-sdl-description": "The schema file describes the database's full schema."},"mode": {"standard": "Standard",diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex cb863d1632..4148e2b9f4 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -1140,6 +1140,7 @@"gitops-description-file-path": "数据库变更脚本存放在 {fullPath}。为了进行一次变更,开发者需要创建一个匹配 {fullPathTemplate} 文件路径格式的变更脚本。","gitops-description-branch": "当脚本审核通过并且合并到 {branch} 分支后,Bytebase 将自动发起一条流水线来执行新的 schema 变更。","gitops-description-description-schema-path": "当 schema 变更完成后, Bytebase 会把变更后的最新 schema 回写到指定的 {schemaPathTemplate}。",+ "gitops-description-sdl": "数据库变更脚本存放在 {fullPath}。如果要变更据库 schema,开发者需要修改脚本文件 {schemaPathTemplate}。如果要修改数据库数据,开发者需要按照 {filePathTemplate} 创建一个变更脚本。当脚本合并到 {branch} 分支后,Bytebase 将自动发起一条流水线来执行新的数据库变更。","restore-to-ui-workflow": "恢复到 UI 工作流","restore-ui-workflow-description": "当使用 UI 工作流时,开发者会通过 Bytebase\n\n控制台直接提交一个 SQL 审核工单,让指定的 DBA 或者开发同事审核。当审核通过后,Bytebase 再执行相应的 SQL 变更。","restore-ui-workflow-success": "成功恢复到 UI 工作流",@@ -1292,9 +1293,9 @@"btn-text": "恢复这个@:common.project"},"schema-change-type": "Schema 变更类型",- "select-schema-change-type-ddl": "通过指定过程 DDL 变更到期望的 Schema",- "select-schema-change-type-sdl": "直接指定期望达到的 Schema",- "schema-path-template-sdl-description": "Schema 定义文件应该包括了数据库 Schema 所在的状态。Bytebase 将会为在 Schema 状态和实际数据库之间发现的任何差异创建新的迁移。"+ "select-schema-change-type-ddl": "命令式 - 面向过程的 DDL 命令,如 ALTER TABLE",+ "select-schema-change-type-sdl": "声明式 - 面向终态的 Schema 描述,如 CREATE TABLE",+ "schema-path-template-sdl-description": "Schema 文件描述了完整的数据库结构。"},"mode": {"standard": "标准",