Skip to content

Commit 5822f74

Browse files
dylanmslavinroshangautam
authored andcommitted
[fix] use table prefix config
- update TaskRepository and Result model to use table prefix config
1 parent 58b870f commit 5822f74

File tree

4 files changed

+28
-28
lines changed

4 files changed

+28
-28
lines changed

public/css/app.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/app.js

Lines changed: 24 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Repositories/EloquentTaskRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function builder() : Builder
2929
{
3030
$result = new Result;
3131

32-
return (new Task)->select('tasks.*')
32+
return (new Task)->select(TOTEM_TABLE_PREFIX.'tasks.*')
3333
->selectSub(
3434
$result->getLastRun(),
3535
'last_ran_at'

src/Result.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function task()
2929
public function getLastRun() : Builder
3030
{
3131
return $this->select('ran_at')
32-
->whereColumn('task_id', 'tasks.id')
32+
->whereColumn('task_id', TOTEM_TABLE_PREFIX.'tasks.id')
3333
->latest()
3434
->limit(1)
3535
->getQuery();
@@ -41,7 +41,7 @@ public function getLastRun() : Builder
4141
public function getAverageRunTime() : Builder
4242
{
4343
return $this->select(DB::raw('avg(duration)'))
44-
->whereColumn('task_id', 'tasks.id')
44+
->whereColumn('task_id', TOTEM_TABLE_PREFIX.'tasks.id')
4545
->getQuery();
4646
}
4747
}

0 commit comments

Comments
 (0)