用户配置转移

This commit is contained in:
2022-11-01 16:39:45 +08:00
parent 719a9ff89d
commit 87e650b2f1
14 changed files with 461 additions and 33 deletions

View File

@@ -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();
});

View File

@@ -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');
}
}