1
0
mirror of https://github.com/flarum/core.git synced 2025-07-31 13:40:20 +02:00

fix prefix failing in tests

This commit is contained in:
Daniël Klabbers
2022-03-24 00:28:25 +01:00
committed by Daniël Klabbers
parent 65dd37278b
commit 6a65993ea5

View File

@@ -99,7 +99,7 @@ class Post extends AbstractModel
$post->number = new Expression('('.$db
->table('posts', 'pn')
->whereRaw('pn.discussion_id = '.intval($post->discussion_id))
->select($db->raw('max(pn.number) + 1'))
->select($db->raw('max('. $db->getTablePrefix() .'pn.number) + 1'))
->toSql()
.')');
});