<?php

use Illuminate\Database\Migrations\Migration;
use Inside\Notify\Models\NotificationType;

class ChangeNotificationTypesToSystem extends Migration
{
    public function up(): void
    {
        $types = NotificationType::query()->whereIn('action', ['export', 'ebook', 'basket', 'bulkCSV-export', 'bulkCSV-import', 'bulkCSV-import-failed'])->get();
        foreach ($types as $type) {
            $type->type = 'system';
            $type->save();
        }
    }

    public function down(): void
    {
    }
}
