This commit is contained in:
1ilit
2023-09-19 15:50:44 +03:00
parent 662e2294e8
commit 2760f458af
5 changed files with 37 additions and 131 deletions

View File

@@ -61,8 +61,8 @@ function jsonToSQL(obj) {
}\` ${field.type}${
field.length !== "n/a"
? `(${field.length})`
: field.enumValues
? `(${field.enumValues.map((v) => `"${v}"`).join(", ")})`
: field.type === "ENUM" || field.type === "SET"
? `(${field.values.map((v) => `"${v}"`).join(", ")})`
: ""
}${field.notNull ? " NOT NULL" : ""}${
field.increment ? " AUTO_INCREMENT" : ""