<?php

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

return new class extends Migration
{
    public function up(): void
    {
        Schema::create('statistics', function (Blueprint $table) {
            $table->id();
            $table->integer('jumlah_penduduk')->default(0);
            $table->integer('laki_laki')->default(0);
            $table->integer('perempuan')->default(0);
            $table->integer('jumlah_kk')->default(0);
            $table->integer('jumlah_dusun')->default(0);
            $table->integer('jumlah_rt')->default(0);
            $table->decimal('luas_wilayah_ha', 10, 2)->default(0);
            $table->text('tingkat_pendidikan')->nullable();
            $table->text('mata_pencaharian')->nullable();
            $table->timestamps();
        });
    }

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