<?php

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

class CreateInstagramTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('instagram', function (Blueprint $table) {
            $table->increments('id');
            $table->string("username");
            $table->string("image_name", 1000);
            $table->string("image_url", 1000);
            $table->tinyInteger("has_downloaded")->default(1);
            $table->tinyInteger("is_uploaded")->default(0);
            $table->timestamps();
//            $table->index(["image_name"], "idx_image_name");
        });
    }

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