From e8882645c41bb20629d77984d712504536755b4e Mon Sep 17 00:00:00 2001 From: Tiago vasconcelos Date: Mon, 15 Nov 2021 21:45:13 +0000 Subject: [PATCH] remove IF NOT EXISTS in CREATE VIEW --- lnbits/core/migrations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lnbits/core/migrations.py b/lnbits/core/migrations.py index 76f4854c3..ebecb5e30 100644 --- a/lnbits/core/migrations.py +++ b/lnbits/core/migrations.py @@ -64,7 +64,7 @@ async def m001_initial(db): await db.execute( """ - CREATE VIEW IF NOT EXISTS balances AS + CREATE VIEW balances AS SELECT wallet, COALESCE(SUM(s), 0) AS balance FROM ( SELECT wallet, SUM(amount) AS s -- incoming FROM apipayments @@ -144,7 +144,7 @@ async def m004_ensure_fees_are_always_negative(db): await db.execute("DROP VIEW balances") await db.execute( """ - CREATE VIEW IF NOT EXISTS balances AS + CREATE VIEW balances AS SELECT wallet, COALESCE(SUM(s), 0) AS balance FROM ( SELECT wallet, SUM(amount) AS s -- incoming FROM apipayments