<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    public function up(): void
    {
        Schema::table('rss_feeds', function (Blueprint $table) {
            $table->boolean('is_rewrite_enabled')->default(false)->after('fetch_full_content');
            $table->text('rewrite_prompt')->nullable()->after('is_rewrite_enabled');
        });
    }

    public function down(): void
    {
        Schema::table('rss_feeds', function (Blueprint $table) {
            $table->dropColumn(['is_rewrite_enabled', 'rewrite_prompt']);
        });
    }
};