From 14a22ddb66b54afdd4db39e0c993f14acaacaa52 Mon Sep 17 00:00:00 2001 From: rouggy Date: Sun, 19 Jul 2026 18:35:18 +0200 Subject: [PATCH] fix: SetExtra used the wrong column name (extras -> extras_json) The targeted extras write used SET extras, but the column is extras_json, so sending an OpsLog QSL card (and the recording stamps) failed with an unknown- column error. Use the real column name. --- internal/qso/qso.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/qso/qso.go b/internal/qso/qso.go index b4d1bef..5e9ed19 100644 --- a/internal/qso/qso.go +++ b/internal/qso/qso.go @@ -793,7 +793,7 @@ func (r *Repo) SetExtra(ctx context.Context, id int64, key, value string) error return fmt.Errorf("missing id or key") } var extrasJSON sql.NullString - if err := r.db.QueryRowContext(ctx, `SELECT extras FROM qso WHERE id = ?`, id).Scan(&extrasJSON); err != nil { + if err := r.db.QueryRowContext(ctx, `SELECT extras_json FROM qso WHERE id = ?`, id).Scan(&extrasJSON); err != nil { return fmt.Errorf("load extras: %w", err) } m := decodeExtras(extrasJSON.String) @@ -806,7 +806,7 @@ func (r *Repo) SetExtra(ctx context.Context, id int64, key, value string) error m[key] = value } if _, err := r.db.ExecContext(ctx, - `UPDATE qso SET extras = ?, updated_at = ? WHERE id = ?`, + `UPDATE qso SET extras_json = ?, updated_at = ? WHERE id = ?`, encodeExtras(m), db.NowISO(), id); err != nil { return fmt.Errorf("set extra %s: %w", key, err) }