Skip to content

Commit

Permalink
Reverted the migration
Browse files Browse the repository at this point in the history
  • Loading branch information
ankit-canyon committed Dec 10, 2024
1 parent da65fb2 commit cd6e655
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,12 @@
return new class () extends Migration {
public function up(): void
{
if(!app()->runningUnitTests()){
$alerts = DB::table('alerts')->whereNotNull('status')->get();

$alerts->each(function ($alert, $key) {
$status = DB::table('alert_statuses')->where('classification', $alert->status)->first();
DB::table('alerts')->where('id', $alert->id)->update(['status_id' => $status->id]);
});
}
}

public function down(): void {}
Expand Down

0 comments on commit cd6e655

Please sign in to comment.