mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 13:44:06 -08:00
comments
This commit is contained in:
parent
cb10c7af27
commit
ad6b502005
|
@ -23,7 +23,7 @@ class DenormalizedEolAndAddColumnForExplicitDateToAssets extends Migration
|
||||||
|
|
||||||
|
|
||||||
// Update the eol_explicit column with the value from asset_eol_date if it exists and is different from the calculated value
|
// Update the eol_explicit column with the value from asset_eol_date if it exists and is different from the calculated value
|
||||||
$assetsToUpdateEolExplicit = [];
|
//$assetsToUpdateEolExplicit = [];
|
||||||
DB::transaction(function() {
|
DB::transaction(function() {
|
||||||
Asset::whereNotNull('asset_eol_date')->with('model')->chunkById(500, function ($assetsWithEolDates) {
|
Asset::whereNotNull('asset_eol_date')->with('model')->chunkById(500, function ($assetsWithEolDates) {
|
||||||
foreach ($assetsWithEolDates as $asset) {
|
foreach ($assetsWithEolDates as $asset) {
|
||||||
|
@ -35,7 +35,7 @@ class DenormalizedEolAndAddColumnForExplicitDateToAssets extends Migration
|
||||||
}
|
}
|
||||||
if ($asset->model->eol) {
|
if ($asset->model->eol) {
|
||||||
if ($months != $asset->model->eol) {
|
if ($months != $asset->model->eol) {
|
||||||
$assetToUpdateEolExplicit = $asset->id;
|
//$assetToUpdateEolExplicit = $asset->id;
|
||||||
$asset->update(['eol_explicit' => true]);
|
$asset->update(['eol_explicit' => true]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue