Skip to content

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

chore: fetch db metadata skip cache (#12320)

boojackcd92b1191f10
diff --git a/frontend/src/components/Database/DatabaseChangeHistoryPanel.vue b/frontend/src/components/Database/DatabaseChangeHistoryPanel.vue
index 9c6dd6016b..2635e6538a 100644
--- a/frontend/src/components/Database/DatabaseChangeHistoryPanel.vue
+++ b/frontend/src/components/Database/DatabaseChangeHistoryPanel.vue
@@ -192,6 +192,7 @@ const prepareChangeHistoryList = async () => {
// prepare database metadata for getting affected tables.
await useDBSchemaV1Store().getOrFetchDatabaseMetadata({
database: props.database.name,
+ skipCache: true, // Skip cache to get the latest metadata.
});
state.loading = false;
};
diff --git a/frontend/src/components/ProjectChangeHistoryPanel.vue b/frontend/src/components/ProjectChangeHistoryPanel.vue
index 39ef04ebc1..2bfb484370 100644
--- a/frontend/src/components/ProjectChangeHistoryPanel.vue
+++ b/frontend/src/components/ProjectChangeHistoryPanel.vue
@@ -47,7 +47,6 @@ import { databaseV1Url } from "@/utils";
const MAX_MIGRATION_HISTORY_COUNT = 5;
interface LocalState {
- databaseSectionList: ComposedDatabase[];
changeHistorySectionList: BBTableSectionDataSource<ChangeHistory>[];
}
@@ -61,12 +60,10 @@ const props = defineProps({
const changeHistoryStore = useChangeHistoryStore();
const state = reactive<LocalState>({
- databaseSectionList: [],
changeHistorySectionList: [],
});
const fetchChangeHistory = async (databaseList: ComposedDatabase[]) => {
- state.databaseSectionList = [];
state.changeHistorySectionList = [];
for (const database of databaseList) {
const changeHistoryList = await changeHistoryStore.fetchChangeHistoryList({
@@ -74,8 +71,6 @@ const fetchChangeHistory = async (databaseList: ComposedDatabase[]) => {
pageSize: MAX_MIGRATION_HISTORY_COUNT,
});
if (changeHistoryList.length > 0) {
- state.databaseSectionList.push(database);
-
const title = `${database.databaseName} (${database.effectiveEnvironmentEntity.title})`;
const index = state.changeHistorySectionList.findIndex(
(item: BBTableSectionDataSource<ChangeHistory>) => {