<?php

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

class CreateAlbumProductAttrTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('album_product_attr', function (Blueprint $table) {
            $table->increments('id');
            $table->string('category',255)->comment('产品分类');
            $table->string('type',255)->comment('产品型号');
            $table->string('color',255)->comment('产品颜色');

            $table->integer('sort')->nullable()->comment('排序，越大越靠前');
            $table->integer('store_id')->comment('站点');

            $table->softDeletes();
            $table->timestamps();
        });
    }

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