<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB; // Asegúrate de importar la clase DB

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('estatuses', function (Blueprint $table) {
            $table->engine = "InnoDB";
            $table->bigIncrements('id');
            $table->string('estatus');
            $table->timestamps();
        });

        // Llamar al seeder
        $this->seedEstatusB();
    }

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

    /**
     * Seed the estatusB table.
     *
     * @return void
     */
    private function seedEstatusB()
    {
        DB::table('estatuses')->insert([
            ['estatus' => 'Activo'],
            ['estatus' => 'Inactivo']
        ]);
    }
};
