From 16a93b08d8416ae29261e26a15326e29faa2b2db Mon Sep 17 00:00:00 2001 From: Correl Date: Wed, 11 Jan 2023 16:34:29 -0500 Subject: [PATCH] Update materialized views --- tutor/cli.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tutor/cli.py b/tutor/cli.py index 07528a4..46a064f 100644 --- a/tutor/cli.py +++ b/tutor/cli.py @@ -300,6 +300,10 @@ def update_scryfall(ctx, filename): , "tix" = "excluded"."tix" """ ) + print("Updating materialized views") + await cursor.execute('UPDATE MATERIALIZED VIEW "cards"') + await cursor.execute('UPDATE MATERIALIZED VIEW "oracle_latest"') + await tutor.database.store_var(cursor, "last_update", str(today)) await conn.commit()