<?php

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

class AddListStyleBlocks extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if (Schema::hasColumn('generic_blocks', 'use_chevron')) {
            Schema::table('generic_blocks', function (Blueprint $table) {
                $table->dropColumn('use_chevron');
            });
        }
        Schema::table('blocks', function (Blueprint $table) {
            $table->string('list_style')->nullable();
        });
    }

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