mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 13:44:06 -08:00
one more check
This commit is contained in:
parent
8c9961aba8
commit
cc82e86eeb
|
@ -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)')
|
||||
|
|
Loading…
Reference in a new issue