espresso-sequencer
espresso-sequencer copied to clipboard
chore(persistence): make vid_share2 migration idempotent with ON CONFLICT
Add missing ON CONFLICT DO NOTHING to INSERT into vid_share2 in migrate_vid_shares. This aligns the function with other batch migrations (anchor_leaf, da_proposal, quorum_proposals, quorum_certificate), ensuring idempotency on batch boundaries and safe restarts. Without this, re-running a partially completed batch or resuming from an offset would attempt to re-insert rows with the same PRIMARY KEY(view), causing unique constraint violations and breaking the migration.