<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('_accident_251_points_histories', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedSmallInteger('point_id')->nullable()->index('accident_251_points_histories_point_id_foreign');
            $table->unsignedInteger('user_id')->nullable()->index('accident_251_points_histories_user_id_foreign');
            $table->string('previous_lat');
            $table->string('previous_lng');
            $table->string('previous_cost')->nullable();
            $table->string('previous_progress')->nullable();
            $table->string('previous_end_date')->nullable();
            $table->text('previous_actions')->nullable();
            $table->text('new_files')->nullable();
            $table->timestamps();
        });
    }

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