<?php

namespace Modules\Dummy\Database\Seeders\Modules\OpenAI\versions\v2_8_0;

use Illuminate\Database\Seeder;

class PreferenceTableSeeder extends Seeder
{
    public function run()
    {
        $userPermission =  \DB::table('preferences')->where('field', 'user_permission')->first();

        if ($userPermission) {

            $value = json_decode($userPermission->value, true) + ['hide_ai_detector' => '0'];
            \DB::table('preferences')->where('field', 'user_permission')->update(['value' => $value]);
        }
    }
}
