<?php

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

class UpdateBannerTable211019 extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('baners', function (Blueprint $table) {
            if (!Schema::hasColumn('baners', 'link')) {
                $table->text('link')->nullable();
            }

            if (!Schema::hasColumn('baners', 'header')) {
                $table->string('header')->nullable();
            }

            if (!Schema::hasColumn('baners', 'sub_header')) {
                $table->string('sub_header')->nullable();
            }
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
