<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
{
    Schema::create('school_profile', function (Blueprint $table) {
        $table->id();
        $table->string('name'); // Nama Sekolah
        $table->string('address')->nullable();
        $table->string('principal_name')->nullable(); // Nama Kepala Sekolah
        $table->string('principal_nip')->nullable();  // NIP Kepala Sekolah
        $table->timestamps();
    });

    // Insert data default agar tidak error saat pertama buka
    DB::table('school_profile')->insert([
        'name' => 'SMK Negeri Contoh',
        'created_at' => now(),
        'updated_at' => now(),
    ]);
}
};
