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