1
0
mirror of https://github.com/flarum/core.git synced 2025-07-15 13:56:23 +02:00

missed another prefix for tests

This commit is contained in:
Daniël Klabbers
2022-03-24 00:34:51 +01:00
committed by Daniël Klabbers
parent 3ae113b897
commit 6839c9436f

View File

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