one more check

This commit is contained in:
spencerrlongg 2023-10-04 16:54:56 -05:00
parent 8c9961aba8
commit cc82e86eeb

View file

@ -60,6 +60,7 @@ class DenormalizedEolAndAddColumnForExplicitDateToAssets extends Migration
DB::table('assets')
->whereNull('asset_eol_date')
->whereNotNull('purchase_date')
->whereNotNull('model_id')
->join('models', 'assets.model_id', '=', 'models.id')
->update([
'asset_eol_date' => DB::raw('DATE_ADD(purchase_date, INTERVAL models.eol MONTH)')