41 lines
1.1 KiB
PHP
41 lines
1.1 KiB
PHP
|
|
<?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('users', function (Blueprint $table) {
|
|||
|
|
$table->id();
|
|||
|
|
$table->string('name')->nullable();
|
|||
|
|
$table->string('mobile', 20)->unique()->nullable();
|
|||
|
|
$table->string('password')->nullable();
|
|||
|
|
$table->string("avatar")->nullable();
|
|||
|
|
$table->enum('sex', [1,2])->nullable()->comment("性别,1:男,2:女");
|
|||
|
|
$table->string('birthday')->nullable();
|
|||
|
|
$table->integer('stature')->nullable()->comment("身高:单位cm");
|
|||
|
|
$table->string('api_token', 100)->nullable();
|
|||
|
|
$table->timestamp('expire_at')->nullable();
|
|||
|
|
$table->timestamps();
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* Reverse the migrations.
|
|||
|
|
*
|
|||
|
|
* @return void
|
|||
|
|
*/
|
|||
|
|
public function down()
|
|||
|
|
{
|
|||
|
|
Schema::dropIfExists('users');
|
|||
|
|
}
|
|||
|
|
};
|