<?php

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

/**
 * Migration auto-generated by Sequel Pro/Ace Laravel Export (1.8.1)
 * @see https://github.com/cviebrock/sequel-pro-laravel-export
 */
class CreateSbPrintifyOrderImportDataTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if (!Schema::hasTable('sb_printify_order_import_data')) {
            Schema::create('sb_printify_order_import_data', function (Blueprint $table) {
                $table->increments('id');
                $table->string('print_provider_name', 255)->nullable();
                $table->integer('print_provider_id')->nullable();
                $table->string('blueprint_title', 255)->nullable();
                $table->integer('blueprint_id')->nullable();
                $table->string('variant_title', 255)->nullable();
                $table->integer('variant_id')->nullable();
                $table->string('printable_areas', 255)->nullable();
                $table->index('blueprint_id', 'blueprint_id');
                $table->index('print_provider_id', 'provider_id');
                
                $table->charset = 'utf8';
                $table->collation = 'utf8_unicode_ci';
            });
        }
        
    }

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