Store empty user_func as null (#14900)

This commit is contained in:
Jellyfrog
2023-03-14 18:42:45 +01:00
committed by GitHub
parent 68e0b3df28
commit ca8b780494

View File

@@ -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()
{
}
}