Add logging for scryfall update

This commit is contained in:
Correl Roush 2023-06-20 15:26:38 -04:00
parent 2faee10169
commit 306d2f2ba0

View file

@ -248,7 +248,7 @@ def update_scryfall(ctx, filename):
except:
print(f"Skipping entry {card_json}")
bar.update(read)
print("Updating card data & indexes")
print("Updating oracle card data & indexes")
await cursor.execute(
"""
INSERT INTO "oracle"
@ -263,8 +263,7 @@ def update_scryfall(ctx, filename):
FROM "tmp_cards"
WHERE "tmp_cards"."oracle_id" IS NOT NULL
ON CONFLICT (oracle_id) DO UPDATE
SET "oracle_id" = "excluded"."oracle_id"
, "name" = "excluded"."name"
SET "name" = "excluded"."name"
, "color_identity" = "excluded"."color_identity"
, "cmc" = "excluded"."cmc"
, "mana_cost" = "excluded"."mana_cost"
@ -273,6 +272,7 @@ def update_scryfall(ctx, filename):
, "oracle_text" = "excluded"."oracle_text"
"""
)
print("Updating scryfall card data & indexes")
await cursor.execute(
"""
INSERT INTO "scryfall"