<?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('leaderboards', function (Blueprint $table) {
            $table->integer('ranking')->default(0)->change();
            $table->string('semester', 50)->default('1')->change();
            $table->string('tahun_ajaran', 20)->default('2024/2025')->change();
        });
    }

    public function down(): void
    {
        Schema::table('leaderboards', function (Blueprint $table) {
            $table->integer('ranking')->default(null)->change();
            $table->string('semester', 50)->default(null)->change();
            $table->string('tahun_ajaran', 20)->default(null)->change();
        });
    }
};