<?php namespace RainLab\User\Updates;

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

class UsersAddWebVariants extends Migration
{
    public function up()
    {
        Schema::table('users', function($table)
        {
            $table->string('web1')->nullable();
            $table->string('web2')->nullable();
            $table->string('web3')->nullable();
            $table->string('web4')->nullable();
            $table->string('web5')->nullable();
            $table->string('web6')->nullable();
        });
    }

    public function down()
    {
        if (Schema::hasColumn('users', 'web1')) {
            Schema::table('users', function($table)
            {
                $table->dropColumn('web1');
                $table->dropColumn('web2');
                $table->dropColumn('web3');
                $table->dropColumn('web4');
                $table->dropColumn('web5');
                $table->dropColumn('web6');
            });
        }
        
    }
}
