<?php

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

class UpdateIsFeaturedBlog extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::table('blogs', function(Blueprint $table) {
            $table->boolean('is_featured')->default(false);
        });

        Schema::create('popups', function(Blueprint $table) {
           $table->increments('id');
           $table->integer('type')->nullable();
           $table->string('image')->nullable();
           $table->date('start_time')->nullable();
           $table->date('end_time')->nullable();
           $table->string('link')->nullable();
           $table->timestamps();
           $table->softDeletes();
           $table->integer('user_id');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        Schema::table('blogs', function(Blueprint $table) {
            $table->dropColumn('is_featured');
        });

        Schema::drop('popups');
    }
}
