mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #21738] [CLOSED] fix: drop unique index on tag(id) to fix duplicate-key errors #41883
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/21738
Author: @martional
Created: 2/22/2026
Status: ❌ Closed
Base:
main← Head:fix/drop-tag-id-unique-index📝 Commits (1)
0e4622cfix: drop unique index on tag(id) to fix duplicate-key errors📊 Changes
1 file changed (+53 additions, -0 deletions)
View changed files
➕
backend/open_webui/migrations/versions/c8d4e5f6a7b8_drop_tag_id_unique_index.py(+53 -0)📄 Description
fix: drop unique index on tag(id) to fix duplicate-key errors
Summary
Fixes #21737
Drops any leftover unique index on
tag.idalone that conflicts with the composite primary key(id, user_id). In some upgrade paths or database engines, a unique index onidalone can persist from the original schema and causeUNIQUE constraint failed: tag.id(SQLite) or equivalent errors when multiple users create tags with the same name.Changes
c8d4e5f6a7b8_drop_tag_id_unique_index.pythat inspects the tag table and drops any unique index onidalone if it existsTesting
tag.idis dropped, resolving duplicate-key errors when different users create tags with the same nameChecklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.