ufutx.dma/database/migrations/2014_10_12_000000_create_users_table.php

41 lines
1.1 KiB
PHP
Raw Normal View History

2026-03-04 14:42:40 +08:00
<?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');
}
};