Skip to content

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

fix: filter only done changelogs in sync schema (#16566)

boojack019b604c7841
diff --git a/frontend/src/components/IssueV1/components/Sidebar/Sidebar.vue b/frontend/src/components/IssueV1/components/Sidebar/Sidebar.vue
index 7f3e1e5a44..6e5ed307cc 100644
--- a/frontend/src/components/IssueV1/components/Sidebar/Sidebar.vue
+++ b/frontend/src/components/IssueV1/components/Sidebar/Sidebar.vue
@@ -13,7 +13,7 @@
<div class="border-t -mx-3" />
<NTooltip :showArrow="false">
<template #trigger>
- <p class="textinfolabel -mb-2">
+ <p class="textinfolabel">
{{ $t("plan.options.self") }}
<span class="opacity-80">
({{
diff --git a/frontend/src/components/SyncDatabaseSchemaV1/DatabaseSchemaSelector.vue b/frontend/src/components/SyncDatabaseSchemaV1/DatabaseSchemaSelector.vue
index b8500e1afd..c395e44d64 100644
--- a/frontend/src/components/SyncDatabaseSchemaV1/DatabaseSchemaSelector.vue
+++ b/frontend/src/components/SyncDatabaseSchemaV1/DatabaseSchemaSelector.vue
@@ -53,11 +53,16 @@
</template>
<script lang="tsx" setup>
+import { head } from "lodash-es";
+import type { SelectOption } from "naive-ui";
+import { NSelect, NTag } from "naive-ui";
+import { computed, reactive, ref, watch } from "vue";
+import { useI18n } from "vue-i18n";
import { DatabaseSelect, EnvironmentSelect } from "@/components/v2";
import {
useChangelogStore,
useDBSchemaV1Store,
- useDatabaseV1Store
+ useDatabaseV1Store,
} from "@/store";
import {
UNKNOWN_ID,
@@ -67,6 +72,7 @@ import {
} from "@/types";
import type { Changelog } from "@/types/proto/v1/database_service";
import {
+ Changelog_Status,
Changelog_Type,
changelog_TypeToJSON,
} from "@/types/proto/v1/database_service";
@@ -75,11 +81,6 @@ import {
isValidChangelogName,
mockLatestChangelog,
} from "@/utils/v1/changelog";
-import { head } from "lodash-es";
-import type { SelectOption } from "naive-ui";
-import { NSelect, NTag } from "naive-ui";
-import { computed, reactive, ref, watch } from "vue";
-import { useI18n } from "vue-i18n";
import HumanizeDate from "../misc/HumanizeDate.vue";
import { ALLOWED_ENGINES, type ChangelogSourceSchema } from "./types";
@@ -143,7 +144,11 @@ const handleDatabaseSelect = async (name: string | undefined) => {
const databaseChangelogList = (databaseName: string) => {
return changelogStore
.changelogListByDatabase(databaseName)
- .filter((changelog) => ALLOWED_CHANGELOG_TYPES.includes(changelog.type));
+ .filter(
+ (changelog) =>
+ ALLOWED_CHANGELOG_TYPES.includes(changelog.type) &&
+ changelog.status === Changelog_Status.DONE
+ );
};
const schemaVersionOptions = computed(() => {