migration to mysql
Some checks failed
PHPUnit / test (push) Has been cancelled

This commit is contained in:
2026-07-10 09:57:44 +02:00
parent 351af170a0
commit 810ed24792
24 changed files with 986 additions and 208 deletions

View File

@ -383,12 +383,16 @@ function qdb_recompute_profile_scores_for_client(PDO $pdo, string $clientCode, ?
$upsert = $pdo->prepare(
'INSERT INTO client_scoring_profile_result
(clientCode, profileID, weightedTotal, band, computedAt, questionnaireSnapshot)
VALUES (:cc, :pid, :wt, :band, :at, :snap)
ON CONFLICT(clientCode, profileID) DO UPDATE SET
weightedTotal = excluded.weightedTotal,
band = excluded.band,
computedAt = excluded.computedAt,
questionnaireSnapshot = excluded.questionnaireSnapshot'
VALUES (:cc, :pid, :wt, :band, :at, :snap) '
. qdb_upsert_update(
['clientCode', 'profileID'],
[
'weightedTotal' => 'excluded.weightedTotal',
'band' => 'excluded.band',
'computedAt' => 'excluded.computedAt',
'questionnaireSnapshot' => 'excluded.questionnaireSnapshot',
]
)
);
foreach ($profiles as $profile) {