mirror of
https://github.com/drawdb-io/drawdb.git
synced 2025-08-29 02:25:26 +00:00
Import diagram fixes (#549)
This commit is contained in:
@@ -121,7 +121,7 @@ export function fromMariaDB(ast, diagramDb = DB.GENERIC) {
|
||||
const endField = endTable.fields.find(
|
||||
(f) => f.name === endFieldName,
|
||||
);
|
||||
if (endField) return;
|
||||
if (!endField) return;
|
||||
|
||||
const startField = table.fields.find(
|
||||
(f) => f.name === startFieldName,
|
||||
|
@@ -4,10 +4,12 @@ import { dbToTypes } from "../../data/datatypes";
|
||||
|
||||
const affinity = {
|
||||
[DB.ORACLESQL]: new Proxy(
|
||||
{ INT: "INTEGER" },
|
||||
{ NUMERIC: "NUMBER" },
|
||||
{ DECIMAL: "NUMBER" },
|
||||
{ CHARACTER: "CHAR" },
|
||||
{
|
||||
INT: "INTEGER",
|
||||
NUMERIC: "NUMBER",
|
||||
DECIMAL: "NUMBER",
|
||||
CHARACTER: "CHAR",
|
||||
},
|
||||
{ get: (target, prop) => (prop in target ? target[prop] : "BLOB") },
|
||||
),
|
||||
[DB.GENERIC]: new Proxy(
|
||||
@@ -25,7 +27,6 @@ export function fromOracleSQL(ast, diagramDb = DB.GENERIC) {
|
||||
const enums = [];
|
||||
|
||||
const parseSingleStatement = (e) => {
|
||||
console.log(e);
|
||||
if (e.operation === "create") {
|
||||
if (e.object === "table") {
|
||||
const table = {};
|
||||
|
@@ -13,7 +13,7 @@ const affinity = {
|
||||
INTEGER: "INT",
|
||||
MEDIUMINT: "INTEGER",
|
||||
BIT: "BOOLEAN",
|
||||
"CHATACTER VARYING": "VARCHAR",
|
||||
"CHARACTER VARYING": "VARCHAR",
|
||||
},
|
||||
{ get: (target, prop) => (prop in target ? target[prop] : "BLOB") },
|
||||
),
|
||||
|
Reference in New Issue
Block a user