<?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 {

    public function up(): void {
        Schema::connection('mysql_dados_abertos')->create('ppps', function (Blueprint $table) {
            $table->uuid('id')->primary();
            $table->timestamps();
            $table->uuid('structure_id');
            $table->string('projeto', 255)->nullable();
            $table->longText('objeto')->nullable();
            $table->string('criterioJulgamento', 255)->nullable();
            $table->string('empresa', 255)->nullable();
            $table->string('CNPJ', 255)->nullable();
            $table->date('dt_assinaturaContrato')->nullable();
            $table->date('dt_licenca')->nullable();
            $table->string('prazo', 255)->nullable();
            $table->string('status', 255)->nullable();
            $table->string('prazoImplantacao', 255)->nullable();
            $table->string('outorgaFixa', 255)->nullable();
            $table->string('outorgaVariavel', 255)->nullable();
            $table->string('aporteMunicipio', 255)->nullable();
            $table->string('contraprestacaoMensal', 255)->nullable();
            $table->string('valorEstimadoContrato', 255)->nullable();
        });

    }

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