fix(export): allow routine-only database exports

Closes #6888
This commit is contained in:
t8y2 committed 2026-08-23 22:00:42 +08:00
1 parent e15ade130d
commit b4b04d30b8
3 files changed
+58 -3

No files matched your search

@@ -6,3 +6,13 @@ export function buildSelectedTablesPayload(allTables: string[], selectedTables:
const selected = new Set(selectedTables);
return allTables.filter((table) => selected.has(table));
}
export function isDatabaseExportTableSelectionValid(options: {
allTableCount: number;
selectedTableCount: number;
includeStructure: boolean;
includeData: boolean;
}): boolean {
if (!options.includeStructure && !options.includeData) return true;
return options.allTableCount === 0 || options.selectedTableCount > 0;
}