<?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('berita', function (Blueprint $table) {
            $table->id('id_berita');          // ID khusus
            $table->string('judul_berita');    // Judul berita
            $table->text('isi_berita');        // Isi berita
            $table->date('tanggal_berita');    // Tanggal berita
            $table->string('gambar_berita')->nullable(); // Gambar berita opsional
            $table->timestamps();              // created_at & updated_at
        });
    }

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