<?php

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

class CreateTransactionMappingLogsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('transaction_mapping_logs', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('imported_by')->unsigned();
            $table->foreign('imported_by')->references('id')->on('users');
            $table->dateTime('imported_date')->nullable();
            $table->text('data')->nullable();
            $table->timestamps();
        });
    }

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