From 20bcc73000dc50e4f4ad03d9483b93ed7d141c5e Mon Sep 17 00:00:00 2001 From: snipe Date: Sat, 28 Oct 2017 06:33:15 -0700 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20emit=20to=20logs=20on=20this=20?= =?UTF-8?q?migration,=20otherwise=20we=E2=80=99ll=20flood=20the=20actionlo?= =?UTF-8?q?gs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2017_10_27_192423_migrate_denormed_asset_locations.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/database/migrations/2017_10_27_192423_migrate_denormed_asset_locations.php b/database/migrations/2017_10_27_192423_migrate_denormed_asset_locations.php index accc3e34bb..1c6757e6e0 100644 --- a/database/migrations/2017_10_27_192423_migrate_denormed_asset_locations.php +++ b/database/migrations/2017_10_27_192423_migrate_denormed_asset_locations.php @@ -23,6 +23,7 @@ class MigrateDenormedAssetLocations extends Migration foreach ($rtd_assets as $rtd_asset) { \Log::info('Setting asset '.$rtd_asset->id.' to location: '.$rtd_asset->rtd_location_id." Because asset's default location is: ".$rtd_asset->rtd_location_id); $rtd_asset->location_id=$rtd_asset->rtd_location_id; + $rtd_asset->unsetEventDispatcher(); $rtd_asset->save(); } @@ -38,6 +39,7 @@ class MigrateDenormedAssetLocations extends Migration $new_location=$assigned_user_asset->rtd_location_id; } $assigned_user_asset->location_id=$new_location; + $assigned_user_asset->unsetEventDispatcher(); $assigned_user_asset->save(); } @@ -48,6 +50,7 @@ class MigrateDenormedAssetLocations extends Migration foreach ($assigned_location_assets as $assigned_location_asset) { $assigned_location_asset->location_id=$assigned_location_asset->assignedTo->id; \Log::info('(calculated to be: '.$assigned_location_asset->assetLoc()); + $assigned_location_asset->unsetEventDispatcher(); $assigned_location_asset->save(); } @@ -79,7 +82,7 @@ class MigrateDenormedAssetLocations extends Migration } - + } /**