Bug Description
projects.path has a global UNIQUE index, not scoped per SSH connection. Since different remote hosts commonly mount projects at the same conventional path, registering a project on a second host fails if any other host already has a project registered at that same path.
Steps to Reproduce
- Add SSH connection
host-a, register a project at path /home/user/project.
- Add SSH connection
host-b.
- Register a project at the same path
/home/user/project on host-b.
- Observe the error.
Actual vs Expected Behavior
- Actual:
Error invoking remote method 'projects.createProject': SqliteError: UNIQUE constraint failed: projects.path
- Expected: Paths should only need to be unique per connection (
(ssh_connection_id, path)), since paths are independent across separate remote hosts.
emdash Version
1.1.35
Operating System
macOS (Darwin 24.3.0)
Additional Context
CREATE UNIQUE INDEX idx_projects_path ON projects (path);
Suggested fix: composite unique index on (ssh_connection_id, path) instead of path alone, with a migration.
Bug Description
projects.pathhas a global UNIQUE index, not scoped per SSH connection. Since different remote hosts commonly mount projects at the same conventional path, registering a project on a second host fails if any other host already has a project registered at that same path.Steps to Reproduce
host-a, register a project at path/home/user/project.host-b./home/user/projectonhost-b.Actual vs Expected Behavior
Error invoking remote method 'projects.createProject': SqliteError: UNIQUE constraint failed: projects.path(ssh_connection_id, path)), since paths are independent across separate remote hosts.emdash Version
1.1.35
Operating System
macOS (Darwin 24.3.0)
Additional Context
Suggested fix: composite unique index on
(ssh_connection_id, path)instead ofpathalone, with a migration.