Skip to content

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

chore: fix project schema migration type check (#2611)

boojackb49a16289805
diff --git a/frontend/src/components/RepositoryForm.vue b/frontend/src/components/RepositoryForm.vue
index 821c4863be..fd3552b8fe 100644
--- a/frontend/src/components/RepositoryForm.vue
+++ b/frontend/src/components/RepositoryForm.vue
@@ -98,7 +98,7 @@
</template>
</BBSelect>
</div>
- <div v-if="schemaMigrationType === 'DDL'">
+ <div v-if="isProjectSchemaMigrationTypeDDL">
<div class="textlabel">
{{ $t("repository.file-path-template") }}
<span class="text-red-600">*</span>
@@ -165,7 +165,7 @@
>
</div>
<div class="mt-1 textinfolabel">
- <template v-if="schemaMigrationType === 'DDL'">
+ <template v-if="isProjectSchemaMigrationTypeDDL">
{{ $t("repository.schema-writeback-description") }}
<span class="font-medium text-main">{{
$t("repository.schema-writeback-protected-branch")
@@ -293,6 +293,10 @@ export default defineComponent({
return props.project.tenantMode === "TENANT";
});
+ const isProjectSchemaMigrationTypeDDL = computed(() => {
+ return (props.project.schemaMigrationType || "DDL") === "DDL";
+ });
+
const sampleFilePath = (
baseDirectory: string,
filePathTemplate: string,
@@ -385,6 +389,7 @@ export default defineComponent({
fileOptionalPlaceholder,
schemaOptionalTagPlaceholder,
state,
+ isProjectSchemaMigrationTypeDDL,
sampleFilePath,
sampleSchemaPath,
};