Skip to content

Database migration broken during migration to master #9608

Closed

Description

@endothermicdev

Running commit 019a5e1. When migrating from 26.06.8 to master:

2026-10-07T20:30:15.567Z INFO lightningd: Updating database from version 284 to 288
2026-10-07T20:30:15.567Z BROKEN lightningd: Error executing statement: wallet/migrations.c:69: INSERT OR IGNORE INTO our_outputs (txid, outnum, blockheight, txindex, scriptpubkey, satoshis, spendheight, reserved_til, keyindex, channel_dbid, peer_id, commitment_point, option_anchors, csv) SELECT prev_out_tx, prev_out_index, COALESCE(confirmation_height, 0), CASE WHEN confirmation_height IS NULL THEN 0 WHEN is_in_coinbase = 1 THEN 0 ELSE 1 END, scriptpubkey, value, spend_height, COALESCE(reserved_til, 0), CASE WHEN channel_id IS NULL THEN keyindex ELSE NULL END, channel_id, peer_id, commitment_point, option_anchor_outputs, csv_lock FROM outputs WHERE scriptpubkey IS NOT NULL;: no such table: our_outputs

Activity

  1. changed the title [-]Database migration broken during migration to v26.06.9[/-] [+]Database migration broken during migration to master[/+] on Oct 7, 2026
  2. vincenzopalazzo commented on Oct 7, 2026

    @vincenzopalazzo
    Collaborator

    Is this impacting the migration from .8 to .9?

  3. hMsats commented on Oct 8, 2026

    @hMsats
    Contributor

    @vincenzopalazzo I migrated from 8 to 9 without encountering any problems.

  4. endothermicdev commented on Oct 8, 2026

    @endothermicdev
    CollaboratorAuthor

    .8 to .9 is okay - I mistakenly had master checked out initially, but the migration failed there.

  5. added 4 commits that reference this issue on Oct 8, 2026
    9423de9
    905f324
    ed32907
    6767053
  6. Lagrang3 commented on Oct 9, 2026

    @Lagrang3
    Collaborator

    We are aware of the issue.
    One of the security point releases introduced a breaking change in the database
    0393174 "wallet: clamp absurd inflight funding feerates on upgrade".
    Which in turn was introduced in master on top of other migrations planned for the next major release.
    In reversed chronological order:

    f057c6927955dc00137e004fdca7bcc6bffefdc4 "wallet: clamp absurd inflight funding feerates on upgrade"
    4eb80237fd844286625bcd936f79baccf46a9ced "lightningd: store raw failure message so waitsendpay always has raw_message"
    2e23893b9e99330783cc3df73e26c30f44db9973 "wallet: add migrate_backfill_bwatch_tables"
    ea4d1fca084750ecff674876cf11476a9bc03dbb "wallet: add our_outputs + our_txs schema migrations"
    

    Therefore moving from 26.06.x to the master branch fails. Which is definitely wrong because after we release the next
    major release (26.12?) we want the software to smoothly upgrade the database from 26.06.x to 26.12.
    Therefore to fix this we need to invert the order of the entries in the migrations array.
    @vincenzopalazzo is right on spot here #9613.

    Notice that trying to migrate from master to a point release was never expected to be smooth, since you might find breaking
    changes to be published in the following release.

    In any case for the record:

    • trying to migrate from master to a point release is always a downgrade, use the downgrade tool.
    master -> downgrade tool -> 26.06 -> 26.06.x
    
    • trying to migrate from a point release to master should usually work out of the box, it doesn't this time, sorry for our mistake, but again you can use the downgrade tool.
    26.06.x -> downgrade tool -> 26.06 -> master
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions