<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

return new class extends Migration
{
    public function up(): void
    {
        DB::table('job_sources')
            ->where('slug', 'jobicy-rss')
            ->update([
                'is_active' => false,
                'notes' => 'RSS endpoint is listed for reference, but Jobicy may return HTTP 403 to server-side clients. Keep Jobicy API active for imports.',
                'last_failed_at' => null,
                'last_failure_reason' => null,
                'updated_at' => now(),
            ]);
    }

    public function down(): void
    {
        DB::table('job_sources')
            ->where('slug', 'jobicy-rss')
            ->update([
                'is_active' => true,
                'updated_at' => now(),
            ]);
    }
};
