<?php

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

class CreateArticlesTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('articles', function(Blueprint $table)
		{
			$table->increments('id');
			$table->integer('category_id')->comment('分类id');
			$table->string('title', 200)->comment('标题');
			$table->string('keywords', 200)->comment('关键词');
			$table->text('description', 65535)->comment('描述');
			$table->text('content', 65535)->comment('内容');
			$table->integer('click')->default(0)->comment('点击量');
			$table->string('thumb', 200)->nullable()->comment('缩略图');
			$table->timestamps();
		});
	}


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

}
