master
parent
47b2c86dc0
commit
6489f8d8d4
@ -0,0 +1,54 @@
|
||||
<?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();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 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');
|
||||
});
|
||||
}
|
||||
};
|
||||
Loading…
Reference in new issue