#7039·beads

0062: clones that adopt by pull end up with an empty events table - pre-upgrade audit history survives only on the migrating clone

Author: seanmartinsmithCreated Sep 30, 2026Updated Sep 30, 2026
Labelskind/bugpriority/p0

the 1.3.0 changelog says 0062's drop/commit/recreate "preserves every row" - true on the clone that runs it. every clone that adopts by pull loses its whole pre-upgrade events history locally: the pull brings 0062's committed DROP, the recreate is dolt_ignored so it never replicates, and ignored/0019 recreates the table empty (its comment frames that as the fresh-clone case, existing clones land there too).

measured (bd 1.3.0 f45b249ce, dolt 2.2.1, server mode, remote-backed, 3 machines): a consumer copy went 4109 events -> 0 and bd history <id> --events was empty for everything pre-upgrade. the migrator kept all 4109. same on every adopted db on both consumers.

that fits "events rows no longer replicate" going forward, but nothing says existing clones lose history they already had, and after the next squash window it's unrecoverable there.

backfill that worked, per db on the consumer, into the freshly recreated empty table:

SELECT commit_hash FROM dolt_log WHERE message LIKE 'schema: apply migration 0061%';
-- column list required: the recreated order differs from the pre-0062 one
SELECT GROUP_CONCAT(COLUMN_NAME ORDER BY ORDINAL_POSITION) FROM INFORMATION_SCHEMA.COLUMNS
  WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'events';
INSERT INTO events (<cols>) SELECT <cols> FROM events AS OF '<hash>';

4109 rows back, bd history --events works, status clean. ids are the pre-0061-rekey values, harmless since events no longer replicate

fix shape, either: a note + recipe in upgrading.md's multi-clone section, or ignored/0019 (or a step right after it) seeds events from the last commit before the 0062 drop when it creates the table on a clone whose history contains that drop - deterministic, consent-free, and the rows are already in the clone's own history

related: #6727, #6142/#6547, #6488