| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateUserDetailsTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * 用户详情
- *
- * @return void
- */
- public function up()
- {
- Schema::create('user_details', function (Blueprint $table) {
- $table->bigInteger('user_id')->unique()->comment('外键用户');
- $table->string('full_name')->nullable()->comment('全名');
- $table->enum('gender',['未知','男','女'])->nullable()->comment('性别');
- $table->string('identity_number')->nullable()->index()->comment('身份证号');
- $table->string('mobile_phone')->nullable()->index()->comment('手机号');
- $table->enum('type',['无','员工','临时工','客户'])->default('无')->comment('类型');
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('user_details');
- }
- }
|