Skip to content

Commit 961f6b9

Browse files
committed
fix: subtraction in access_enum
Signed-off-by: Christian Hartmann <[email protected]>
1 parent 64cf901 commit 961f6b9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/Migration/Version050000Date20241005173955.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ public function postSchemaChange(IOutput $output, Closure $schemaClosure, array
3131
$qbUpdate = $this->db->getQueryBuilder();
3232

3333
$qbUpdate->update('forms_v2_forms')
34-
->set('access_enum', 'access_enum - 3')
34+
->set('access_enum', $qbUpdate->func()->subtract(
35+
'access_enum',
36+
$qbUpdate->createNamedParameter(3, IQueryBuilder::PARAM_INT)
37+
))
3538
->where($qbUpdate->expr()->gte('access_enum', '3'))
3639
->executeStatement();
3740
}

0 commit comments

Comments
 (0)