diff --git a/database/migrations/2016_12_27_212631_make_asset_assigned_to_polymorphic.php b/database/migrations/2016_12_27_212631_make_asset_assigned_to_polymorphic.php index a00692c7b1..d98212265b 100644 --- a/database/migrations/2016_12_27_212631_make_asset_assigned_to_polymorphic.php +++ b/database/migrations/2016_12_27_212631_make_asset_assigned_to_polymorphic.php @@ -16,23 +16,21 @@ class MakeAssetAssignedToPolymorphic extends Migration public function up() { Schema::table('assets', function (Blueprint $table) { - // $table->string('assigned_type')->nullable(); }); // Prior to this migration, asset's could only be assigned to users. - Asset::whereNotNull('assigned_to')->orWhere('assigned_to', '')->update(['assigned_type' => User::class]); + Asset::whereNotNull('assigned_to')->orWhere('assigned_to', '!=', '')->update(['assigned_type' => User::class]); } /** * Reverse the migrations. * - * @return void + * @return voidatom */ public function down() { Schema::table('assets', function (Blueprint $table) { - // $table->dropColumn('assigned_type'); }); }