<?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('jadwal_imunisasi', function (Blueprint $table) {
            $table->id();
            $table->foreignId('anak_id')->constrained('anak')->onDelete('cascade');
            $table->string('nama_imunisasi');
            $table->date('tanggal_imunisasi');
            $table->timestamps();
        });
    }

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