mirror of
https://github.com/drawdb-io/drawdb.git
synced 2025-09-01 10:25:13 +00:00
Merge branch 'main' of https://github.com/drawdb-io/drawdb into dbml
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { Cardinality } from "../../data/constants";
|
import { Cardinality } from "../../data/constants";
|
||||||
import i18n from "../../i18n/i18n";
|
import i18n from "../../i18n/i18n";
|
||||||
import { parseDefault } from "../exportSQL/shared";
|
import { escapeQuotes, parseDefault } from "../exportSQL/shared";
|
||||||
|
|
||||||
function columnDefault(field, database) {
|
function columnDefault(field, database) {
|
||||||
if (
|
if (
|
||||||
@@ -18,7 +18,7 @@ function columnComment(field) {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
return `note: '${field.comment}'`;
|
return `note: '${escapeQuotes(field.comment)}'`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function columnSettings(field, database) {
|
function columnSettings(field, database) {
|
||||||
@@ -102,7 +102,7 @@ export function toDBML(diagram) {
|
|||||||
: ""
|
: ""
|
||||||
}${
|
}${
|
||||||
table.comment && table.comment.trim() !== ""
|
table.comment && table.comment.trim() !== ""
|
||||||
? `\n\n\tNote: '${table.comment}'`
|
? `\n\n\tNote: '${escapeQuotes(table.comment)}'`
|
||||||
: ""
|
: ""
|
||||||
}\n}`,
|
}\n}`,
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user