From 8701b5aef3754155d34973dddbfc2b053a609c68 Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Sat, 12 Sep 2020 00:41:02 +0100 Subject: [PATCH] Update source_id in fame_list table --- src/oro/private/originsdb_sqlite.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/oro/private/originsdb_sqlite.cpp b/src/oro/private/originsdb_sqlite.cpp index de1db54..d73f385 100644 --- a/src/oro/private/originsdb_sqlite.cpp +++ b/src/oro/private/originsdb_sqlite.cpp @@ -560,7 +560,14 @@ void OriginsDBSQLite::update (const Creators& creat, const oro::Timestamp& next_ } }; - SQLite::Statement query(db, "INSERT INTO fame_list(type, master_id, name, points, source_id) VALUES (?, ?, ?, ?, ?) ON CONFLICT(master_id) DO UPDATE SET points=excluded.points"); + SQLite::Statement query( + db, + "INSERT INTO fame_list(type, master_id, name, points, source_id) " + "VALUES (?, ?, ?, ?, ?) " + "ON CONFLICT(master_id) DO UPDATE SET " + "points=excluded.points" + ", source_id=excluded.source_id" + ); SQLite::Transaction transaction(db); const SQLiteID source_id = insert_source_ifn(db, source);