mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-01-22 23:44:26 +01:00
Refactor confirmation count tracking (#6215)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
CREATE OR REPLACE FUNCTION is_pending(status TEXT)
|
||||
RETURNS BOOLEAN AS $$
|
||||
SELECT status = 'Processing' OR status = 'New';
|
||||
$$ LANGUAGE sql IMMUTABLE;
|
||||
|
||||
CREATE INDEX "IX_Invoices_Pending" ON "Invoices"((1)) WHERE is_pending("Status");
|
||||
CREATE INDEX "IX_Payments_Pending" ON "Payments"((1)) WHERE is_pending("Status");
|
||||
|
||||
DROP TABLE "PendingInvoices";
|
||||
Reference in New Issue
Block a user