mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-31 16:24:33 +00:00
feat(diff): add data compare and schema sync coverage
This commit is contained in:
@@ -6,6 +6,7 @@ import type { SidebarLayout } from "@/types/database";
|
||||
|
||||
const showTransferDialog = ref(false);
|
||||
const showSchemaDiffDialog = ref(false);
|
||||
const showDataCompareDialog = ref(false);
|
||||
const showSqlFileDialog = ref(false);
|
||||
const showDiagramDialog = ref(false);
|
||||
const showTableImportDialog = ref(false);
|
||||
@@ -23,6 +24,11 @@ const transferPrefillConnectionId = ref("");
|
||||
const transferPrefillDatabase = ref("");
|
||||
const schemaDiffPrefillConnectionId = ref("");
|
||||
const schemaDiffPrefillDatabase = ref("");
|
||||
const schemaDiffPrefillSchema = ref("");
|
||||
const dataComparePrefillConnectionId = ref("");
|
||||
const dataComparePrefillDatabase = ref("");
|
||||
const dataComparePrefillSchema = ref("");
|
||||
const dataComparePrefillTable = ref("");
|
||||
const sqlFilePrefillConnectionId = ref("");
|
||||
const sqlFilePrefillDatabase = ref("");
|
||||
const diagramPrefillConnectionId = ref("");
|
||||
@@ -75,12 +81,27 @@ export function useDialogSources() {
|
||||
if (v) {
|
||||
schemaDiffPrefillConnectionId.value = v.connectionId;
|
||||
schemaDiffPrefillDatabase.value = v.database;
|
||||
schemaDiffPrefillSchema.value = v.schema ?? "";
|
||||
showSchemaDiffDialog.value = true;
|
||||
connectionStore.schemaDiffSource = null;
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
watch(
|
||||
() => connectionStore.dataCompareSource,
|
||||
(v) => {
|
||||
if (v) {
|
||||
dataComparePrefillConnectionId.value = v.connectionId;
|
||||
dataComparePrefillDatabase.value = v.database;
|
||||
dataComparePrefillSchema.value = v.schema ?? "";
|
||||
dataComparePrefillTable.value = v.tableName ?? "";
|
||||
showDataCompareDialog.value = true;
|
||||
connectionStore.dataCompareSource = null;
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
watch(
|
||||
() => connectionStore.sqlFileSource,
|
||||
(v) => {
|
||||
@@ -221,6 +242,7 @@ export function useDialogSources() {
|
||||
return {
|
||||
showTransferDialog,
|
||||
showSchemaDiffDialog,
|
||||
showDataCompareDialog,
|
||||
showSqlFileDialog,
|
||||
showDiagramDialog,
|
||||
showTableImportDialog,
|
||||
@@ -237,6 +259,11 @@ export function useDialogSources() {
|
||||
transferPrefillDatabase,
|
||||
schemaDiffPrefillConnectionId,
|
||||
schemaDiffPrefillDatabase,
|
||||
schemaDiffPrefillSchema,
|
||||
dataComparePrefillConnectionId,
|
||||
dataComparePrefillDatabase,
|
||||
dataComparePrefillSchema,
|
||||
dataComparePrefillTable,
|
||||
sqlFilePrefillConnectionId,
|
||||
sqlFilePrefillDatabase,
|
||||
diagramPrefillConnectionId,
|
||||
|
||||
Reference in New Issue
Block a user