Skip to content

Commit

Permalink
db: Add completed_at field to payments
Browse files Browse the repository at this point in the history
We'll want to use these to track durations for `sendpays` and `pays`.
  • Loading branch information
cdecker committed Sep 14, 2022
1 parent 3ad8347 commit daeec66
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wallet/db.c
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,9 @@ static struct migration dbmigrations[] = {
* in routehints in invoices. The peer will remember all the
* aliases, but we only ever need one. */
{SQL("ALTER TABLE channels ADD alias_remote BIGINT DEFAULT NULL"), NULL},
/* Cheeky immediate completion as best effort approximation of real completion time */
{SQL("ALTER TABLE payments ADD completed_at INTEGER DEFAULT NULL;"), NULL},
{SQL("UPDATE payments SET completed_at = timestamp WHERE status != 0;"), NULL}
};

/**
Expand Down

0 comments on commit daeec66

Please sign in to comment.