Skip to content

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

chore: use statement sheet from change history (#9386)

Danny Xu235a33e6ab6b
diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryForm.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryForm.vue
index d93a239e8c..3897830a6f 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryForm.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryForm.vue
@@ -68,7 +68,6 @@ import {
useChangeHistoryStore,
useDBSchemaV1Store,
useDatabaseV1Store,
- useLocalSheetStore,
} from "@/store";
import { UNKNOWN_ID } from "@/types";
import { AffectedTable, EmptyAffectedTable } from "@/types/changeHistory";
@@ -81,7 +80,6 @@ import {
extractDatabaseResourceName,
getAffectedTablesOfChangeHistory,
keyBy,
- setSheetStatement,
} from "@/utils";
import ChangeHistoryDetailPanel from "../../ChangeHistoryDetailPanel";
import { useChangelistDetailContext } from "../../context";
@@ -102,7 +100,6 @@ type LocalState = {
const { project } = useChangelistDetailContext();
const { changesFromChangeHistory: changes } = useAddChangeContext();
-const localSheetStore = useLocalSheetStore();
const state = reactive<LocalState>({
isLoading: false,
@@ -166,13 +163,8 @@ const selectedChangeHistoryList = computed<string[]>({
if (existedChange) {
updatedChanges.push(existedChange);
} else {
- const uid = localSheetStore.nextUID();
- const sheet = localSheetStore.createLocalSheet(
- `${project.value.name}/sheets/${uid}`
- );
- setSheetStatement(sheet, changeHistory.statement);
updatedChanges.push({
- sheet: sheet.name,
+ sheet: changeHistory.statementSheet,
source: changeHistory.name,
});
}