<?php

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

class CreateArticlesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('articles', function (Blueprint $table) {
            $table->id();
			$table->string("title");
			$table->string("slug")->nullable();
			$table->text("description")->nullable();
			$table->longText("content")->nullable();
			$table->string("thumbnail")->nullable();
			$table->integer("category_id")->nullable();
			$table->string("keyword")->nullable();
			$table->string("tag")->nullable();
			$table->boolean("allow_amp")->default(false);
			$table->string("seo_robots")->nullable();
			$table->string("seo_title")->nullable();
			$table->string("seo_keywords")->nullable();
			$table->string("seo_description")->nullable();
			$table->string("preview")->nullable();
            $table->datetime("publish_at")->nullable();
            $table->integer("important")->default(0);
            $table->integer("view_number")->default(0);
            $table->integer("user_id")->nullable();
			$table->boolean("is_published")->default(false);
			$table->boolean("is_activated")->default(true);
			$table->boolean("is_deleted")->default(false);
            $table->timestamps();
        });
    }

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