mirror of
https://github.com/drawdb-io/drawdb.git
synced 2025-05-24 10:29:11 +00:00
Fix import source
This commit is contained in:
parent
173b02daa2
commit
0ec280b821
@ -102,7 +102,7 @@ export default function Modal({
|
|||||||
const parser = new Parser();
|
const parser = new Parser();
|
||||||
let ast = null;
|
let ast = null;
|
||||||
try {
|
try {
|
||||||
ast = parser.astify(importData.src, { database: "MySQL" });
|
ast = parser.astify(importSource.src, { database: "MySQL" });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
Toast.error(
|
Toast.error(
|
||||||
"Could not parse the sql file. Make sure there are no syntax errors."
|
"Could not parse the sql file. Make sure there are no syntax errors."
|
||||||
@ -111,7 +111,7 @@ export default function Modal({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const d = astToDiagram(ast);
|
const d = astToDiagram(ast);
|
||||||
if (importData.overwrite) {
|
if (importSource.overwrite) {
|
||||||
setTables(d.tables);
|
setTables(d.tables);
|
||||||
setRelationships(d.relationships);
|
setRelationships(d.relationships);
|
||||||
setNotes([]);
|
setNotes([]);
|
||||||
|
Loading…
Reference in New Issue
Block a user