<?php

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

class AddSomeColumnIntoSliderDetailsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('slider_details', function (Blueprint $table) {
            $table->string('title')->after('name')->nullable();
            $table->smallInteger('is_line')->after('description')->default(1);
            $table->string('origin_image')->after('image')->nullable();
            $table->smallInteger('border')->after('link')->default(0);
            $table->string('stroke')->after('link')->nullable();
            $table->string('color')->after('link')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('slider_details', function (Blueprint $table) {
            $table->dropColumn('title');
            $table->dropColumn('is_line');
            $table->dropColumn('origin_image');
            $table->dropColumn('border');
            $table->dropColumn('stroke');
            $table->dropColumn('color');
        });
    }
}
