<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('course_schedules', function (Blueprint $table) {
            $table->string('instructor')->nullable()->after('location');
            $table->unsignedInteger('enrolled_count')->default(0)->after('available_seats');
            $table->decimal('price_override', 10, 2)->nullable()->after('enrolled_count');
            $table->string('status')->default('planned')->after('price_override');
            $table->text('notes')->nullable()->after('is_urgent');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('course_schedules', function (Blueprint $table) {
            $table->dropColumn(['instructor', 'enrolled_count', 'price_override', 'status', 'notes']);
        });
    }
};
