Skip to content

Commit d208e37

Browse files
authored
Merge branch 'main' into main
2 parents 25542b5 + 9f834da commit d208e37

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/utils/exportSQL/mariadb.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export function toMariaDB(diagram) {
1111
(field) =>
1212
`\t\`${
1313
field.name
14-
}\` ${field.type}${field.unsigned ? " UNSIGNED" : ""}${field.notNull ? " NOT NULL" : ""}${
14+
}\` ${field.type}${field.values ? "(" + field.values.map((value) => "'" + value + "'").join(", ") + ")" : ""}${field.unsigned ? " UNSIGNED" : ""}${field.notNull ? " NOT NULL" : ""}${
1515
field.increment ? " AUTO_INCREMENT" : ""
1616
}${field.unique ? " UNIQUE" : ""}${
1717
field.default !== ""

src/utils/exportSQL/mysql.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export function toMySQL(diagram) {
99
`CREATE TABLE \`${table.name}\` (\n${table.fields
1010
.map(
1111
(field) =>
12-
`\t\`${field.name}\` ${field.type}${field.unsigned ? " UNSIGNED" : ""}${field.size !== undefined && field.size !== "" ? "(" + field.size + ")" : ""}${
12+
`\t\`${field.name}\` ${field.type}${field.values ? "(" + field.values.map((value) => "'" + value + "'").join(", ") + ")" : ""}${field.unsigned ? " UNSIGNED" : ""}${field.size !== undefined && field.size !== "" ? "(" + field.size + ")" : ""}${
1313
field.notNull ? " NOT NULL" : ""
1414
}${
1515
field.increment ? " AUTO_INCREMENT" : ""

0 commit comments

Comments
 (0)