<?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) {
            $table->json('scope')->nullable()->after('meta_description');
            $table->string('standard')->nullable()->after('scope');
            $table->string('language')->nullable()->default('Türkçe')->after('standard');
            $table->string('location')->nullable()->after('language');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('courses', function (Blueprint $table) {
            $table->dropColumn(['scope', 'standard', 'language', 'location']);
        });
    }
};
