Merge pull request #65 from MagMongoing/main
Include comment statements when exporting MySQL SQL script
This commit is contained in:
commit
792c760eec
@ -181,7 +181,7 @@ export function jsonToMySQL(obj) {
|
|||||||
)}", \`${field.name}\`))`
|
)}", \`${field.name}\`))`
|
||||||
: ""
|
: ""
|
||||||
: ` CHECK(${field.check})`
|
: ` CHECK(${field.check})`
|
||||||
}`,
|
}${field.comment ? ` COMMENT '${field.comment}'` : ''}`,
|
||||||
)
|
)
|
||||||
.join(",\n")}${
|
.join(",\n")}${
|
||||||
table.fields.filter((f) => f.primary).length > 0
|
table.fields.filter((f) => f.primary).length > 0
|
||||||
@ -190,7 +190,7 @@ export function jsonToMySQL(obj) {
|
|||||||
.map((f) => `\`${f.name}\``)
|
.map((f) => `\`${f.name}\``)
|
||||||
.join(", ")})`
|
.join(", ")})`
|
||||||
: ""
|
: ""
|
||||||
}\n);\n${
|
}\n)${table.comment ? ` COMMENT='${table.comment}'` : ''};\n${
|
||||||
table.indices.length > 0
|
table.indices.length > 0
|
||||||
? `\n${table.indices.map(
|
? `\n${table.indices.map(
|
||||||
(i) =>
|
(i) =>
|
||||||
|
Loading…
Reference in New Issue
Block a user