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.
ba7d4a8f6b