mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Fix: Made migration run original command for mysql (#5915)
* Fix: Made migration run original command for mysql * Added sqlite_testing migration * Review suggested fix
This commit is contained in:
parent
e332442132
commit
a55a9ca4cd
|
@ -18,9 +18,9 @@ class MakeAssetAssignedToPolymorphic extends Migration
|
|||
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', '!=', null)->update(['assigned_type' => User::class]);
|
||||
if(config('database.default') == 'mysql') {
|
||||
Asset::whereNotNull('assigned_to')->orWhere('assigned_to', '!=', '')->update(['assigned_type' => User::class]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue