Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion wallet/db.c
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ static struct migration dbmigrations[] = {
" in_channel_scid"
", COALESCE("
" (SELECT channel_htlc_id FROM channel_htlcs WHERE id = forwarded_payments.in_htlc_id),"
" -_ROWID_"
" -row_number() OVER ()"
Comment on lines -939 to +946
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I think you missed the translation layer?

See devtools/sql-rewrite.py...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that sql-rewrite.py rewrite _ROWID_, but I don't get what is exactly the flow to use it, how do I bootstrap a lightning node with cockroach db?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It gets run over all db source files to map anything in a SQL() macro. These get looked up at runtime.

" )"
", out_channel_scid"
", (SELECT channel_htlc_id FROM channel_htlcs WHERE id = forwarded_payments.out_htlc_id)"
Expand Down