mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Store empty user_func as null (#14900)
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class MigrateEmptyUserFuncsToNull extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
\App\Models\Sensor::where('user_func', '')->update(['user_func' => null]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user