<?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(): void
    {
        Schema::table('ordenescompra', function (Blueprint $table) {
            $table->string('tipo_venta')->after("id_estado");
            $table->string('codigo')->after("tipo_venta");
            $table->string('telefono')->after("codigo");
            $table->longText('nombre_comercial')->after("telefono");
            $table->longText('dueno')->after("nombre_comercial");
            $table->integer('id_municipio')->after("dueno");
            $table->longText('direccion')->after("id_municipio");
            $table->string('sector1')->after("direccion");
            $table->string('sector2')->after("sector1");
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('ordenescompra', function (Blueprint $table) {
            $table->dropColumn('tipo_venta');
            $table->dropColumn('codigo');
            $table->dropColumn('telefono');
            $table->dropColumn('nombre_comercial');
            $table->dropColumn('dueno');
            $table->dropColumn('id_municipio');
            $table->dropColumn('direccion');
            $table->dropColumn('sector1');
            $table->dropColumn('sector2');
        });
    }
};
