From 4e9c992a91a0a775de70f7c4175b24ca5d142d41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Tue, 9 Jan 2024 12:34:53 +0100 Subject: [PATCH] revert: migration (#2198) took to long on legend to run, now taking current date as default --- lnbits/core/migrations.py | 40 +++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/lnbits/core/migrations.py b/lnbits/core/migrations.py index b6457a128..3f511c369 100644 --- a/lnbits/core/migrations.py +++ b/lnbits/core/migrations.py @@ -429,27 +429,27 @@ async def m017_add_timestamp_columns_to_accounts_and_wallets(db): f"ADD COLUMN updated_at TIMESTAMP DEFAULT {db.timestamp_column_default}" ) - # set their wallets created_at with the first payment - await db.execute( - """ - UPDATE wallets SET created_at = ( - SELECT time FROM apipayments - WHERE apipayments.wallet = wallets.id - ORDER BY time ASC LIMIT 1 - ) - """ - ) + # # set their wallets created_at with the first payment + # await db.execute( + # """ + # UPDATE wallets SET created_at = ( + # SELECT time FROM apipayments + # WHERE apipayments.wallet = wallets.id + # ORDER BY time ASC LIMIT 1 + # ) + # """ + # ) - # then set their accounts created_at with the wallet - await db.execute( - """ - UPDATE accounts SET created_at = ( - SELECT created_at FROM wallets - WHERE wallets.user = accounts.id - ORDER BY created_at ASC LIMIT 1 - ) - """ - ) + # # then set their accounts created_at with the wallet + # await db.execute( + # """ + # UPDATE accounts SET created_at = ( + # SELECT created_at FROM wallets + # WHERE wallets.user = accounts.id + # ORDER BY created_at ASC LIMIT 1 + # ) + # """ + # ) # set all to now where they are null now = int(time())