fix: address code review findings
- Fix notifications_sent schema: change to composite PK (rgid, sent_at) per plan spec, remove FK constraint - Change MarkNotificationSent from INSERT OR REPLACE to INSERT (composite PK semantics) - Update test: replace idempotent test with duplicate-second and different-time tests - Refactor UpdateArtistSettings to use switch-based column validation instead of fmt.Sprintf with map lookup - Remove generated coverage.out from repo, add to .gitignore Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
// MarkNotificationSent records that a notification has been sent for the given RGID.
|
||||
func MarkNotificationSent(db *DB, rgid string) error {
|
||||
_, err := db.Conn().Exec(
|
||||
"INSERT OR REPLACE INTO notifications_sent (rgid) VALUES (?)",
|
||||
"INSERT INTO notifications_sent (rgid) VALUES (?)",
|
||||
rgid,
|
||||
)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user