Skip to content

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

fix: migration history list (#3597)

boojackbc2a4f36ea2c
diff --git a/frontend/src/components/SyncDatabaseSchemaPrepForm.vue b/frontend/src/components/SyncDatabaseSchemaPrepForm.vue
index 2e46add4ab..8f2748b33e 100644
--- a/frontend/src/components/SyncDatabaseSchemaPrepForm.vue
+++ b/frontend/src/components/SyncDatabaseSchemaPrepForm.vue
@@ -75,7 +75,7 @@
{{ migrationHistory.version }}
</NEllipsis>
</template>
- <template v-if="!hasSyncSchemaFeature" #suffixItem>
+ <template v-if="shouldShowMoreVersionButton" #suffixItem>
<div
class="w-full pl-3 leading-8 text-gray-600 cursor-pointer hover:text-accent"
@click="() => (state.showFeatureModal = true)"
@@ -342,6 +342,14 @@ const engineTypeList = computed((): EngineType[] => {
}
});
+const shouldShowMoreVersionButton = computed(() => {
+ return (
+ !hasSyncSchemaFeature.value &&
+ databaseMigrationHistoryList(state.baseSchemaInfo.databaseId as DatabaseId)
+ .length > 0
+ );
+});
+
const shouldShowDiff = computed(() => {
return (
isValidId(state.projectId) &&
@@ -385,7 +393,7 @@ const databaseMigrationHistoryList = (databaseId: DatabaseId) => {
);
if (!hasSyncSchemaFeature.value) {
- return [list.length > 0 ? head(list) : []];
+ return list.length > 0 ? [head(list)] : [];
}
return list;
};