<?php namespace RainLab\User\Updates;

use Schema;
use October\Rain\Database\Updates\Migration;

class UsersAddIsCategory extends Migration
{
    public function up()
    {
        Schema::table('users', function($table)
        {
            $table->boolean('is_category')->default(false);
        });
    }

    public function down()
    {
        if (Schema::hasColumn('users', 'is_category')) {
            Schema::table('users', function($table)
            {
                $table->dropColumn('is_category');
            });
        }
    }
}
