feat: 新增修改邮箱功能

This commit is contained in:
韦荣超
2022-07-12 18:23:04 +08:00
parent 1daba51286
commit d80943ab6b
8 changed files with 316 additions and 20 deletions
@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddTypeToUserEmailVerificationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('user_email_verifications', function (Blueprint $table) {
if (!Schema::hasColumn('user_email_verifications', 'type')) {
$table->tinyInteger('type')->nullable()->default(1)->after('status')->comment('邮件类型:1-邮箱认证,2-修改邮箱');
}
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('user_email_verifications', function (Blueprint $table) {
$table->dropColumn("type");
});
}
}