Update source_id in fame_list table

This commit is contained in:
King_DuckZ 2020-09-12 00:41:02 +01:00
parent 497d797e32
commit 8701b5aef3

View file

@ -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);