123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateAuthTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('auth', function (Blueprint $table) {
- $table->bigIncrements('id');
- $table->bigInteger('user_id')->default(0)->comment('用户id');
- $table->tinyInteger('type')->default(0)->comment('登录类型(0:微信授权登录)');
- $table->string('identifier', 100)->comment('标识(手机号 邮箱 用户名或第三方应用的唯一标识)');
- $table->string('credential', 200)->comment('密码凭证(站内的保存密码,站外的不保存或保存token)');
- $table->tinyInteger('is_verified')->default(0)->comment('是否验证');
- $table->tinyInteger('status')->default(1);
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('auth');
- }
- }
|