Add table prefix

This commit is contained in:
Marcus Moore 2023-11-27 15:55:33 -08:00
parent 37bd297094
commit 72dbe95168
No known key found for this signature in database

View file

@ -75,7 +75,7 @@ class DenormalizedEolAndAddColumnForExplicitDateToAssets extends Migration
private function eolUpdateExpression(): Expression private function eolUpdateExpression(): Expression
{ {
if (DB::getDriverName() === 'sqlite') { if (DB::getDriverName() === 'sqlite') {
return DB::raw("DATE(purchase_date, '+' || (SELECT eol FROM models WHERE models.id = assets.model_id) || ' months')"); return DB::raw("DATE(purchase_date, '+' || (SELECT eol FROM " . DB::getTablePrefix() ."models WHERE models.id = assets.model_id) || ' months')");
} }
// Default to MySQL's method // Default to MySQL's method