<?php

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

return new class extends Migration
{
    public function up()
    {
        Schema::table('syllabus_archivos', function (Blueprint $table) {
            $table->longText('contenido_base64')->nullable()->after('ruta_archivo');
            $table->string('ruta_archivo')->nullable()->change();
        });
    }

    public function down()
    {
        Schema::table('syllabus_archivos', function (Blueprint $table) {
            $table->dropColumn('contenido_base64');
        });
    }
};
