Added migration to fix existing wonky data

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe
2025-06-03 05:37:37 +01:00
parent e4ce71ff14
commit 7c9433be5d
@@ -0,0 +1,23 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
DB::table('assets')->whereNotNull('assigned_type')->whereNull('assigned_to')->update(['assigned_type' => null]);
}
/**
* Reverse the migrations.
*/
public function down(): void
{
}
};