用户配置转移
This commit is contained in:
@@ -20,8 +20,6 @@ class CreateUsersTable extends Migration
|
||||
$table->string('mobile')->index()->nullable();
|
||||
$table->string('email')->index()->nullable();
|
||||
$table->string('mnemonic')->nullable();
|
||||
$table->boolean('privacy')->default(1)->index();
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUserSettingsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('user_settings', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('user_id')->primary();
|
||||
$table->boolean('google2fa')->default(0)->comment('开启2步验证');
|
||||
$table->string('secret_key', 32)->nullable()->comment('验证器密钥');
|
||||
$table->boolean('privacy')->default(1)->index()->comment('是否允许搜索我');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('user_settings');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user