[PR #515] [MERGED] fix: failed to save bookmark: constraint failed: UNIQUE constraint failed: bookmark.url #636

Closed
opened 2026-02-25 23:34:58 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-shiori/shiori/pull/515
Author: @Acelya-9028
Created: 10/13/2022
Status: Merged
Merged: 10/13/2022
Merged by: @fmartingr

Base: masterHead: master


📝 Commits (1)

  • f2643cc fix: failed to save bookmark: constraint failed: UNIQUE constraint failed: bookmark.url

📊 Changes

4 files changed (+33 additions, -11 deletions)

View changed files

📝 internal/database/database_test.go (+24 -4)
📝 internal/database/mysql.go (+3 -2)
📝 internal/database/pg.go (+3 -2)
📝 internal/database/sqlite.go (+3 -3)

📄 Description

After a first bookmark save, all subsequent ones fail because the update query does not include an identifier and the update is done on all rows.

Add a test to create two different bookmarks.

Introduced by 05fee53bd0


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-shiori/shiori/pull/515 **Author:** [@Acelya-9028](https://github.com/Acelya-9028) **Created:** 10/13/2022 **Status:** ✅ Merged **Merged:** 10/13/2022 **Merged by:** [@fmartingr](https://github.com/fmartingr) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`f2643cc`](https://github.com/go-shiori/shiori/commit/f2643cc3ffbec7f6500f7e75dcca0e99f75f792d) fix: failed to save bookmark: constraint failed: UNIQUE constraint failed: bookmark.url ### 📊 Changes **4 files changed** (+33 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `internal/database/database_test.go` (+24 -4) 📝 `internal/database/mysql.go` (+3 -2) 📝 `internal/database/pg.go` (+3 -2) 📝 `internal/database/sqlite.go` (+3 -3) </details> ### 📄 Description After a first bookmark save, all subsequent ones fail because the update query does not include an identifier and the update is done on all rows. Add a test to create two different bookmarks. Introduced by 05fee53bd0b7e81b5e74c4ae9efcbe213b563744 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 23:34:58 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#636
No description provided.