<?php

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

class CreateRauRiaTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::create('reports', function(Blueprint $table) {
            $table->increments('id');
            $table->integer('report_type')->nullable();
            $table->text('message')->nullable();
            $table->integer('object_type')->default(0);
            $table->integer('status')->default(0);
            $table->integer('user_id')->nullable();
            $table->timestamps();
            $table->softDeletes();
        });

        Schema::create('testimonials', function(Blueprint $table) {
            $table->increments('id');
            $table->string('image')->nullable();
            $table->string('name')->nullable();
            $table->string('content')->default(0);
            $table->integer('status')->default(0);
            $table->timestamps();
            $table->softDeletes();
        });

        Schema::create('categories', function(Blueprint $table) {
            $table->increments('id');
            $table->string('name')->nullable();
            $table->timestamps();
            $table->softDeletes();
        });

        Schema::create('blog_categories', function (Blueprint $table) {
           $table->increments('id');
           $table->integer('blog_id')->nullable();
           $table->integer('category_id')->nullable();
           $table->timestamps();
           $table->softDeletes();
        });

        Schema::create('blogs', function(Blueprint $table) {
            $table->increments('id');
            $table->string('title')->nullable();
            $table->integer('user_id')->nullable();
            $table->text('content')->nullable();
            $table->integer('status')->nullable();
            $table->string('meta_keywords')->nullable();
            $table->string('meta_description')->nullable();
            $table->timestamps();
            $table->softDeletes();
        });
    }

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