<?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()
{
   Schema::create('data_latih', function (Blueprint $table) {
    $table->id();
    $table->string('kecamatan');
    $table->integer('jumlah_penduduk');
    $table->integer('data_tahun')->nullable();
    $table->float('phbs');
    $table->float('pcv1');
    $table->float('pcv2');
    $table->float('imunisasi'); // rata-rata
    $table->float('merokok');
    $table->integer('kasus_2023');
    $table->decimal('latitude', 10, 7);
    $table->decimal('longitude', 10, 7);
    $table->string('hipotesis')->nullable(); // hasil naive bayes
    $table->integer('prediksi_tahun')->nullable(); // <--- tambahkan ini
    $table->timestamps();
});
}

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('data_latih');
    }
};
