| 123456789101112131415161718192021222324252627282930313233343536 |
- <?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::create('phone_code', function (Blueprint $table) {
- $table->engine = 'InnoDB';
- $table->collation = 'utf8mb4_general_ci';
- $table->id();
- $table->string('phone', 64)->comment('手机号');
- $table->string('code', 16)->comment('验证码');
- $table->integer('ext')->comment('过期时间');
- $table->tinyInteger('status')->default(0)->comment('0未使用,1已使用');
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('phone_code');
- }
- };
|