2021_06_23_141736_add_fields_into_admins.php 1.3 KB
<?php

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

class AddFieldsIntoAdmins extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
//        Schema::table('admin_menu', function (Blueprint $table) {
//            $table->softDeletes();
//        });
//
//        Schema::table('admin_permissions', function (Blueprint $table) {
//            $table->softDeletes();
//        });
//
//        Schema::table('admin_roles', function (Blueprint $table) {
//            $table->string('description')->default('')->after('slug')->comment('描述');
//            $table->unsignedTinyInteger('status')->default(1)->after('description')->comment('状态');
//            $table->softDeletes();
//        });

        Schema::table('admin_users', function (Blueprint $table) {
            $table->string('mobile', 64)->default('')->nullable()->after('avatar')->comment('手机号');
            $table->string('company', 100)->default('')->nullable()->after('mobile')->comment('单位名称');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}