Skip to content

fix(Migration): Merge per-user-database-duplicate bookmarks before hashing URLs#2362

Merged
marcelklehr merged 23 commits intomasterfrom
fix/deduplicate-migration
Feb 19, 2026
Merged

fix(Migration): Merge per-user-database-duplicate bookmarks before hashing URLs#2362
marcelklehr merged 23 commits intomasterfrom
fix/deduplicate-migration

Conversation

@marcelklehr
Copy link
Member

doesn't touch duplicates count in the UI

see #2361

doesn't touch duplicates count in the UI

see #2361

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request aims to fix issue #2361, which caused SQL unique constraint violations during migration from v6.0.1 to v6.1.0. The issue occurred because the migration Version016002000Date20260201124723 was hashing URLs and enforcing a unique constraint on (user_id, url_hash) without first deduplicating existing bookmarks that have the same URL for the same user.

Changes:

  • Added Version016002000Date20260218124723.php to deduplicate bookmarks with the same URL per user before hashing
  • Added Version016002000Date20260218134723.php to hash URLs after deduplication
  • The deduplication migration merges folders, tags, and descriptions from duplicate bookmarks into a primary bookmark

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 18 comments.

File Description
lib/Migration/Version016002000Date20260218124723.php New migration that deduplicates bookmarks by URL and user before hashing, merging tags, folders, and descriptions
lib/Migration/Version016002000Date20260218134723.php New migration that hashes URLs after deduplication is complete

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr marcelklehr force-pushed the fix/deduplicate-migration branch from 57c19e2 to d660675 Compare February 18, 2026 12:03
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr marcelklehr force-pushed the fix/deduplicate-migration branch from 89d733b to 8be3903 Compare February 18, 2026 12:17
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr marcelklehr requested a review from Copilot February 18, 2026 14:42
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@marcelklehr marcelklehr requested a review from Copilot February 18, 2026 14:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

marcelklehr and others added 4 commits February 18, 2026 16:11
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr
Copy link
Member Author

Weirdly, Floccus integration tests are not failing on master but failing on this PR, although it only touches the migrations 🤔

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr marcelklehr merged commit 31b7af4 into master Feb 19, 2026
101 of 105 checks passed
@marcelklehr marcelklehr deleted the fix/deduplicate-migration branch February 19, 2026 09:58
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.

1 participant

Comments