feature/edit-tag #66
Reference in New Issue
Block a user
Delete Branch "feature/edit-tag"
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?
Edit + Delete Tags
PUT /image/tags/{id} renames a tag globally; DELETE /image/tags/{id} removes a tag and every photo's reference. Rename returns 200/404/409 (case-insensitive name conflict) / 400 (empty name); delete returns 204/404. New migration adds a UNIQUE COLLATE NOCASE index on tags.name with a pre-flight pass that collapses existing case- insensitive duplicates onto the lowest id. The connection setup now sets PRAGMA foreign_keys = ON. The schema already declares ON DELETE CASCADE / SET NULL on several tables — those clauses were documentation-only because SQLite has FK enforcement off per-connection by default. Audited every diesel::delete site; each touches either no inbound FKs or has a matching policy. delete_tag relies on the tagged_photo cascade instead of doing manual cleanup. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>PATCH /image/faces/{id} can return 503 from three places (face client disabled, transient embed error, mid-flight disable) and none of them were logging — operator sees the status code but nothing in the Rust log explaining why. Add warn! lines at each so future bbox-edit failures aren't silent. Response body is unchanged so existing clients keep working. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>