<?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('courses', function (Blueprint $table) {
            // null = mega menu'de görünmez
            // 1, 2, 3 = kategori kartında gösterilecek kurs sırası
            $table->unsignedTinyInteger('menu_order')->nullable()->after('badge');
        });
    }

    public function down(): void
    {
        Schema::table('courses', function (Blueprint $table) {
            $table->dropColumn('menu_order');
        });
    }
};
