Skip to content

Merge databases - #1130

Open
yonka2019 wants to merge 2 commits into
sabrogden:masterfrom
yonka2019:merge-database
Open

Merge databases#1130
yonka2019 wants to merge 2 commits into
sabrogden:masterfrom
yonka2019:merge-database

Conversation

@yonka2019

Copy link
Copy Markdown

No description provided.

yonka2019 and others added 2 commits July 31, 2026 22:23
Lets you pull the clips out of a second Ditto database into the one you
are currently using, instead of having to export and import them a group
at a time.

MergeDB attaches the other database and copies the Main and Data rows
across in one transaction. Every id is shifted above the largest id in
the current database so nothing collides, and lParentID is shifted by the
same amount so groups keep their children. Clips whose CRC already exists
here are skipped, groups always come over, and the four shortcut columns
are cleared on the merged rows so they can't fight with the existing
shortcuts.

Before anything is written the current database is snapshotted with
VACUUM INTO to Ditto.db.merge.bak, overwritten on each merge.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mian196

mian196 commented Aug 4, 2026

Copy link
Copy Markdown

you should elaborate on this pr a little even just ask Ai to do that for you a nice summary is always helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants