mirror of
https://github.com/correl/mtgsqlive.git
synced 2024-11-22 03:00:10 +00:00
ENUM options fix (#53)
This commit is contained in:
parent
26650c1a05
commit
0b46d58d29
1 changed files with 2 additions and 0 deletions
|
@ -120,6 +120,8 @@ def get_query_from_dict(tables, distro):
|
|||
else:
|
||||
q += " id INTEGER PRIMARY KEY AUTO_INCREMENT,\n"
|
||||
for colName in sorted(tableData.keys()):
|
||||
if tableData[colName]["type"] == "ENUM" and not "options" in tableData[colName]:
|
||||
tableData[colName]["type"] = "TEXT"
|
||||
q += f" {colName} {tableData[colName]['type']}"
|
||||
if tableData[colName]["type"] == "ENUM":
|
||||
q += "('" + "', '".join(tableData[colName]["options"]) + "')"
|
||||
|
|
Loading…
Reference in a new issue