frameeffects

This commit is contained in:
ZeldaZach 2019-10-23 20:46:36 -04:00
parent 6fa3063e7b
commit cd7e36886a

View file

@ -139,6 +139,7 @@ def build_sql_schema(output_file: Dict) -> None:
"faceConvertedManaCost FLOAT,", "faceConvertedManaCost FLOAT,",
"flavorText TEXT,", "flavorText TEXT,",
"frameEffect TEXT,", "frameEffect TEXT,",
"frameEffects TEXT,",
"frameVersion TEXT,", "frameVersion TEXT,",
"hand TEXT,", "hand TEXT,",
"hasFoil INTEGER NOT NULL DEFAULT 0,", # boolean "hasFoil INTEGER NOT NULL DEFAULT 0,", # boolean
@ -229,7 +230,7 @@ def build_sql_schema(output_file: Dict) -> None:
"toughness TEXT,", "toughness TEXT,",
"type TEXT,", "type TEXT,",
"types TEXT,", "types TEXT,",
"uuid TEXT(36) UNIQUE,", "uuid TEXT(36) NOT NULL,",
"watermark TEXT", "watermark TEXT",
");", ");",
"", "",
@ -497,10 +498,15 @@ def handle_price_rows(
""" """
prices = [] prices = []
for price_type in card_data["prices"]: for price_type in card_data["prices"]:
if(card_data["prices"][price_type] is not None): if card_data["prices"][price_type] is not None:
for date, price in card_data["prices"][price_type].items(): for date, price in card_data["prices"][price_type].items():
prices.append( prices.append(
{"uuid": card_uuid, "type": price_type, "price": price, "date": date} {
"uuid": card_uuid,
"type": price_type,
"price": price,
"date": date,
}
) )
return prices return prices