<?php

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

class CreateS1CateAttrTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('s1_cate_attr', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('cate_id')->default(0)->comment('属性id');
            $table->string('name')->comment('属性名称');
            $table->string('value')->comment('多个属性值用,隔开');
            $table->smallInteger('type_id')->default(1)->comment('唯一 可选');
            $table->timestamps();
        });
    }

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