<?php

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

class AddColumnsToUserTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('user', function (Blueprint $table) {

            DB::statement("ALTER TABLE `user` CHANGE COLUMN `locale` `language` VARCHAR(2) DEFAULT NULL ");
            DB::statement("ALTER TABLE `user` MODIFY COLUMN `gender` varchar(2) DEFAULT NULL");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('user', function (Blueprint $table) {

            DB::statement("ALTER TABLE `user` CHANGE COLUMN `language` `locale`  VARCHAR(2) DEFAULT NULL");
        });
    }
}
