<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('conf_list_profiles', function (Blueprint $table) {
            $table->id();
            $table->string('name');
            $table->string('type');
            $table->string('desc');
            $table->timestamps();
        });

        DB::table('conf_list_profiles')->insert([
            [
                'name' => 'D',
                'type' => 'PROD',
                'desc' => ''
            ],
            [
                'name' => 'P',
                'type' => 'PROD',
                'desc' => ''
            ],
            [
                'name' => 'Q',
                'type' => 'PROD',
                'desc' => ''
            ],
            [
                'name' => 'A',
                'type' => 'TEST',
                'desc' => ''
            ],
            [
                'name' => 'B',
                'type' => 'TEST',
                'desc' => ''
            ],
            [
                'name' => 'H',
                'type' => 'TEST',
                'desc' => ''
            ]
        ]);
    }

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