Skip to content

Commit 9cfdeca

Browse files
committed
fix enum and set export syntax for mariadb
1 parent b37e720 commit 9cfdeca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
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 !== ""

0 commit comments

Comments
 (0)