better sort sql clause

This commit is contained in:
callebtc 2022-12-06 21:04:10 +01:00
parent 3bb11dc487
commit 6eb9c5d9ee

@ -216,9 +216,10 @@ async def m007_set_invoice_expiries(db):
SELECT bolt11, checking_id
FROM apipayments
WHERE pending = true
AND amount > 0
AND bolt11 IS NOT NULL
AND expiry IS NULL
AND amount > 0 AND time < {db.timestamp_now}
AND time < {db.timestamp_now}
"""
)
).fetchall()