<?php

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

class CreateProductIntroductionsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('product_introductions', function (Blueprint $table) {
            $table->increments('id');
            $table->string('lang', 10)->index();
            $table->integer('product_id')->index();
            $table->char('code', 32);
            $table->string('title')->nullable();
            $table->longText('content')->nullable();
        });
    }

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