dolt icon indicating copy to clipboard operation
dolt copied to clipboard

Add `--history` flag to `dolt dump`

Open zachmu opened this issue 2 years ago • 2 comments

dolt dump currently generates a SQL script to recreate the database as it exists at the current branch head.

We should accept a --history flag to generate the entire history of the database. This means that it should emit SQL that reproduces every commit of the database, on every branch, with the same data, authors, timestamps, etc. This can be accomplished by emitting call dolt_checkout(), call dolt_commit() at various stages in the export process.

zachmu avatar Oct 26 '23 22:10 zachmu

Not clear where the historical information is dumped to. Some design required here.

macneale4 avatar Apr 30 '25 19:04 macneale4

I think my design would be to separate commits by call dolt_commit() calls and issue insert, updates, and deletes between these calls. THis means replaying the "dump" against a dolt database would recreate the commit history.

On Wed, Apr 30, 2025 at 12:50 PM Neil Macneale IV @.***> wrote:

macneale4 left a comment (dolthub/dolt#6896) https://github.com/dolthub/dolt/issues/6896#issuecomment-2843112786

Not clear where the historical information is dumped to. Some design required here.

— Reply to this email directly, view it on GitHub https://github.com/dolthub/dolt/issues/6896#issuecomment-2843112786, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJAR3AQS7TXMRI3KKNFFI324ESQPAVCNFSM6AAAAAB4GPUIZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQNBTGEYTENZYGY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

timsehn avatar Apr 30 '25 19:04 timsehn