mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-18 12:34:21 +01:00
db: Backfill missing HTLC IDs in the forwards table
We have a primary key that is spanning the `in_channel_id` and the `in_htcl_id`. The latter gets set to NULL when the HTLC and channel gets deleted, so we coalesce with a random large number that is unlikely to collide for the primary key.
This commit is contained in:
@@ -75,6 +75,7 @@ class PostgresRewriter(Rewriter):
|
||||
|
||||
typemapping = {
|
||||
r'BLOB': 'BYTEA',
|
||||
r'_ROWID_': '(((ctid::text::point)[0]::bigint << 32) | (ctid::text::point)[1]::bigint)', # Yeah, I know...
|
||||
r'CURRENT_TIMESTAMP\(\)': "EXTRACT(epoch FROM now())",
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user