<?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('jurusan', function (Blueprint $table) {
            // Hapus kolom lama jika masih ada
            $table->dropColumn('registration_fee'); 
            // Tambahkan kolom baru
            $table->json('registration_fees')->after('program_kuliah')->nullable();
        });
    }

    public function down(): void
    {
        Schema::table('jurusan', function (Blueprint $table) {
            // Kembalikan kolom lama (jika perlu)
            $table->string('registration_fee')->after('program_kuliah')->nullable(); 
            // Hapus kolom baru
            $table->dropColumn('registration_fees');
        });
    }
};