Keep N1MM's message columns when the contest definition is saved again

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 03:50:24 +00:00
co-authored by Claude Sonnet 5.5
parent 393b73f87a
commit b8007355e4
2 changed files with 48 additions and 1 deletions
+12 -1
View File
@@ -33,12 +33,23 @@ public sealed class SqliteLogStore : LogStore
{
using SqliteCommand command = connection.CreateCommand();
command.CommandText = """
INSERT OR REPLACE INTO Contest
INSERT INTO Contest
(Name, DisplayName, CabrilloName, Mode, DupeType, Multiplier1Name,
Multiplier2Name, Multiplier3Name, Period, PointsPerContact, CabrilloVersion)
VALUES
(@name, @display, @cabrillo, @mode, @dupe, @mult1, @mult2, @mult3,
@period, @points, @version)
ON CONFLICT(Name) DO UPDATE SET
DisplayName = excluded.DisplayName,
CabrilloName = excluded.CabrilloName,
Mode = excluded.Mode,
DupeType = excluded.DupeType,
Multiplier1Name = excluded.Multiplier1Name,
Multiplier2Name = excluded.Multiplier2Name,
Multiplier3Name = excluded.Multiplier3Name,
Period = excluded.Period,
PointsPerContact = excluded.PointsPerContact,
CabrilloVersion = excluded.CabrilloVersion
""";
command.Parameters.AddWithValue("@name", definition.Name);
command.Parameters.AddWithValue("@display", definition.DisplayName);