You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
2.0 KiB
57 lines
2.0 KiB
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration {
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::table('users', function (Blueprint $table) {
|
|
$table->dropColumn('name');
|
|
$table->dropColumn('email');
|
|
$table->dropColumn('email_verified_at');
|
|
$table->dropColumn('password');
|
|
$table->string('openid', 200)->nullable()->default('');
|
|
$table->string('sex', 20)->nullable()->default('未知')->comment('性别-未知男女');
|
|
$table->string('nickname', 191)->nullable();
|
|
$table->string('mobile', 100)->nullable()->default('')->comment('手机号');
|
|
$table->string('country', 100)->nullable()->default('');
|
|
$table->string('province', 100)->nullable()->default('');
|
|
$table->string('city', 200)->nullable()->default('');
|
|
$table->string('headimgurl')->nullable();
|
|
$table->string('idcard')->nullable()->comment('身份证号码');
|
|
$table->string('plate')->nullable()->comment('车牌号');
|
|
$table->string('type')->nullable()->comment('人才类型');
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::table('users', function (Blueprint $table) {
|
|
$table->string('name');
|
|
$table->string('email')->unique();
|
|
$table->timestamp('email_verified_at')->nullable();
|
|
$table->string('password');
|
|
$table->dropColumn('openid');
|
|
$table->dropColumn('sex');
|
|
$table->dropColumn('nickname');
|
|
$table->dropColumn('mobile');
|
|
$table->dropColumn('country');
|
|
$table->dropColumn('province');
|
|
$table->dropColumn('city');
|
|
$table->dropColumn('headimgurl');
|
|
});
|
|
}
|
|
};
|