File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export function toMariaDB(diagram) {
11
11
( field ) =>
12
12
`\t\`${
13
13
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" : "" } ${
15
15
field . increment ? " AUTO_INCREMENT" : ""
16
16
} ${ field . unique ? " UNIQUE" : "" } ${
17
17
field . default !== ""
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export function toMySQL(diagram) {
9
9
`CREATE TABLE \`${ table . name } \` (\n${ table . fields
10
10
. map (
11
11
( 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 + ")" : "" } ${
13
13
field . notNull ? " NOT NULL" : ""
14
14
} ${
15
15
field . increment ? " AUTO_INCREMENT" : ""
You can’t perform that action at this time.
0 commit comments