<?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::create('pengumuman', function (Blueprint $table) {
            $table->id('id_pengumuman');       // ID khusus
            $table->string('judul_pengumuman'); // Judul pengumuman
            $table->text('isi_pengumuman');     // Isi pengumuman
            $table->date('tanggal_pengumuman'); // Tanggal pengumuman
            $table->string('gambar_pengumuman')->nullable(); // Gambar opsional
            $table->timestamps();
        });
    }

    public function down()
    {
        Schema::dropIfExists('pengumuman');
    }
};
