<?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('artwork_comments', function (Blueprint $table) {
            // raw_content stores user-submitted markdown/plain text
            // rendered_content stores the sanitized HTML cache
            $table->mediumText('raw_content')->nullable()->after('content');
            $table->mediumText('rendered_content')->nullable()->after('raw_content');
        });
    }

    public function down(): void
    {
        Schema::table('artwork_comments', function (Blueprint $table) {
            $table->dropColumn(['raw_content', 'rendered_content']);
        });
    }
};
