<?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('potentials', function (Blueprint $table) {
            $table->id();
            $table->enum('kategori', ['pertanian', 'perkebunan', 'umkm', 'pariwisata', 'peternakan']);
            $table->string('nama');
            $table->text('deskripsi');
            $table->string('foto')->nullable();
            $table->string('lokasi')->nullable();
            $table->timestamps();

            $table->index('kategori');
        });
    }

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