<?php

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

/**
 * Migration auto-generated by Sequel Pro Laravel Export
 * @see https://github.com/cviebrock/sequel-pro-laravel-export
 */
class CreateUserInfoTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_info', function (Blueprint $table) {
            $table->increments('id')->comment('用户ID');
            $table->char('username', 64)->nullable()->comment('登录名');
            $table->string('password', 255)->nullable()->comment('密码');
            $table->string('email', 100)->nullable()->comment('EMAIL');
            $table->char('mobile', 11)->comment('手机号');
            $table->string('avatar', 255)->nullable()->comment('用户头像');
            $table->tinyInteger('sex')->nullable()->comment('性别,1:男,2:女,参照数据字典');

            $table->timestamps();
            $table->softDeletes();

            $table->index('deleted_at', 'idx_deleted_at');

            

        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('user_info');
    }
}
