<?php

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

class CreateCsvFilesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('csv_files', function (Blueprint $table) {
            $table->id();
            $table->string('key');
            $table->string('file');
            $table->string('name')->nullable();
            $table->string('type')->default('shop');
            $table->smallInteger('overwrite')->default(0);
            $table->integer('total')->default(0);
            $table->integer('imported')->default(0);
            $table->integer('error')->default(0);
            $table->smallInteger('status')->default(0);
            $table->integer('user_id')->nullable();
            $table->timestamps();
        });
    }

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