<?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('kampus', function (Blueprint $table) {

            // Data bagi hasil (JSON)
            $table->json('bagi_hasil')->nullable()->after('alamat');

            // Data MOU
            $table->text('mou')->nullable()->after('bagi_hasil');

            // Kontak
            $table->string('website')->nullable()->after('mou');
            $table->string('email_official')->nullable()->after('website');

            // Biaya formulir (JSON)
            $table->json('biaya_formulir')->nullable()->after('email_official');
        });
    }

    public function down()
    {

        Schema::table('kampus', function (Blueprint $table) {
            $table->dropColumn([
                'kode_kampus',
                'jenis_kampus',
                'bagi_hasil',
                'mou',
                'website',
                'email_official',
                'biaya_formulir'
            ]);
        });
    }
};
