This commit is contained in:
snipe
2026-04-15 21:29:32 +01:00
parent f142eb7a44
commit 53c240f13f
2 changed files with 1 additions and 2 deletions
@@ -25,7 +25,7 @@ class AddEolDateOnAssetsTable extends Migration
// This is a back in time migration to fix restores from very old versions of Snipe-IT where
// companies were not soft-deletable.
Schema::table('companies', function (Blueprint $table) {
if (!Schema::hasColumn('companies', 'deleted_at')) {
if (! Schema::hasColumn('companies', 'deleted_at')) {
$table->softDeletes();
}
});
@@ -23,7 +23,6 @@ class DenormalizedEolAndAddColumnForExplicitDateToAssets extends Migration
$table->boolean('eol_explicit')->default(false)->after('asset_eol_date');
}
});
// Update the eol_explicit column with the value from asset_eol_date if it exists and is different from the calculated value
Asset::whereNotNull('asset_eol_date')->with('model')->chunkById(500, function ($assetsWithEolDates) {