2021_06_23_141736_add_fields_into_admins.php
1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?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()
{
//
}
}