Skip to content

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

fix: compare statement and schema size (#10313)

ecmadao886f5bc91471
diff --git a/frontend/src/store/modules/v1/changeHistory.ts b/frontend/src/store/modules/v1/changeHistory.ts
index 2d55ace9ad..f7209fb6f3 100644
--- a/frontend/src/store/modules/v1/changeHistory.ts
+++ b/frontend/src/store/modules/v1/changeHistory.ts
@@ -8,7 +8,7 @@ import {
GetChangeHistoryRequest,
ListChangeHistoriesRequest,
} from "@/types/proto/v1/database_service";
-import { extractDatabaseResourceName } from "@/utils";
+import { extractDatabaseResourceName, getStatementSize } from "@/utils";
export const useChangeHistoryStore = defineStore("changeHistory_v1", () => {
const changeHistoryMapByName = reactive(new Map<string, ChangeHistory>());
@@ -65,8 +65,12 @@ export const useChangeHistoryStore = defineStore("changeHistory_v1", () => {
const changeHistory = changeHistoryMapByName.get(name);
if (changeHistory) {
if (
- changeHistory.statement.length ===
- changeHistory.statementSize.toNumber() ||
+ (getStatementSize(changeHistory.statement).eq(
+ changeHistory.statementSize
+ ) &&
+ getStatementSize(changeHistory.schema).eq(
+ changeHistory.schemaSize
+ )) ||
view === ChangeHistoryView.CHANGE_HISTORY_VIEW_BASIC
) {
return changeHistory;