[GH-ISSUE #1017] UNIQUE constraint failed on sites.path when initializing database #2132

Closed
opened 2026-02-27 12:18:13 +03:00 by kerem · 0 comments
Owner

Originally created by @YinHeng89 on GitHub (May 7, 2025).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/1017


Title: UNIQUE constraint failed on sites.path when initializing database

Description:

I encountered the following error when starting the application:

nginx-ui  | 2025/05/07 14:31:19 /home/runner/go/pkg/mod/github.com/uozi-tech/cosy@v1.21.1/model/model.go:75 UNIQUE constraint failed: sites.path
nginx-ui  | [0.994ms] [rows:0] CREATE UNIQUE INDEX `idx_sites_path` ON `sites`(`path`)
nginx-ui  | 2025-05-07 14:31:19 FATAL   model/model.go:78       UNIQUE constraint failed: sites.path

This occurs during the attempt to create a UNIQUE index on the path column of the sites table, and the operation fails due to existing duplicate values in that column.


Originally created by @YinHeng89 on GitHub (May 7, 2025). Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/1017 --- ### **Title: UNIQUE constraint failed on `sites.path` when initializing database** #### **Description:** I encountered the following error when starting the application: ``` nginx-ui | 2025/05/07 14:31:19 /home/runner/go/pkg/mod/github.com/uozi-tech/cosy@v1.21.1/model/model.go:75 UNIQUE constraint failed: sites.path nginx-ui | [0.994ms] [rows:0] CREATE UNIQUE INDEX `idx_sites_path` ON `sites`(`path`) nginx-ui | 2025-05-07 14:31:19 FATAL model/model.go:78 UNIQUE constraint failed: sites.path ``` This occurs during the attempt to create a **UNIQUE index** on the `path` column of the `sites` table, and the operation fails due to existing duplicate values in that column. ---
kerem 2026-02-27 12:18:13 +03:00
  • closed this issue
  • added the
    bug
    label
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/nginx-ui#2132
No description provided.