mirror of
https://github.com/correl/mtgsqlive.git
synced 2024-11-25 03:00:10 +00:00
commit
7a234a725f
1 changed files with 7 additions and 0 deletions
|
@ -305,6 +305,13 @@ def generate_sql_schema(json_data: Dict,
|
|||
if setValue not in schema["sets"][setKey]["options"]:
|
||||
schema["sets"][setKey]["options"].append(setValue)
|
||||
else:
|
||||
# handle boosters
|
||||
if setKey == "boosters":
|
||||
if engine == "sqlite":
|
||||
schema["sets"]["booster"] = {"type": "TEXT"}
|
||||
else:
|
||||
schema["sets"]["booster"] = {"type": "LONGTEXT"}
|
||||
continue
|
||||
# determine type of the set property
|
||||
if setKey in enums["sets"] and not engine == "sqlite":
|
||||
schema["sets"][setKey] = {"type": "ENUM", "options": [setValue]}
|
||||
|
|
Loading…
Reference in a new issue