Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit 50f7a2c

Browse files
committed
refactor(dbrunner): Mark functions as deterministic
1 parent e838591 commit 50f7a2c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Service/Types/SchemaDatabase.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,14 @@ private static function setUp(\SQLite3 $db): \SQLite3
6767
);
6868

6969
// MySQL-compatible functions
70-
$db->createFunction('YEAR', $dateop('Y'), 1);
71-
$db->createFunction('MONTH', $dateop('n'), 1);
72-
$db->createFunction('DAY', $dateop('j'), 1);
70+
$db->createFunction('YEAR', $dateop('Y'), 1, SQLITE3_DETERMINISTIC);
71+
$db->createFunction('MONTH', $dateop('n'), 1, SQLITE3_DETERMINISTIC);
72+
$db->createFunction('DAY', $dateop('j'), 1, SQLITE3_DETERMINISTIC);
7373
$db->createFunction(
7474
'IF',
7575
fn (bool $condition, mixed $true, mixed $false) => $condition ? $true : $false,
7676
3,
77+
SQLITE3_DETERMINISTIC
7778
);
7879

7980
return $db;

0 commit comments

Comments
 (0)