Migrate to IDatabase::newInsertQueryBuilder for upsert

Change-Id: I532b206b6c1d652369d4f986d0f5b91958a1ef47
This commit is contained in:
Umherirrender 2024-04-02 16:38:05 +02:00
parent 6bae4af694
commit b8e54d8e2c

View file

@ -140,13 +140,14 @@ class UnreadWikis {
];
// when there is unread alert(s) and/or message(s), upsert the row
$dbw->upsert(
'echo_unread_wikis',
$conditions + $values,
[ [ 'euw_user', 'euw_wiki' ] ],
$values,
__METHOD__
);
$dbw->newInsertQueryBuilder()
->insertInto( 'echo_unread_wikis' )
->row( $conditions + $values )
->onDuplicateKeyUpdate()
->uniqueIndexFields( [ 'euw_user', 'euw_wiki' ] )
->set( $values )
->caller( __METHOD__ )
->execute();
} else {
// No unread notifications, delete the row
$dbw->delete(