2019_03_18_171101_create_user_infos_table.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateUserInfosTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('user_infos', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->tinyInteger('gender')->nullable()->default(0)->comment('性别: 0-女|1-男');
  17. $table->string('github_name')->nullable()->comment('GitHub Name');
  18. $table->string('real_name')->nullable()->comment('真实姓名');
  19. $table->string('city')->nullable()->comment('城市');
  20. $table->string('company')->nullable()->comment('公司或组织名称');
  21. $table->string('jobtitle')->nullable()->comment('职位头衔');
  22. $table->string('personal_website')->nullable()->comment('个人网站');
  23. $table->string('wechat_qrcode')->nullable()->comment('微信账号二维码');
  24. $table->string('payment_qrcode')->nullable()->comment('支付二维码');
  25. $table->string('introduction')->nullable()->comment('个人简介');
  26. $table->string('signature')->nullable()->comment('署名');
  27. $table->string('avatar')->nullable()->comment('头像: 暂不启用');
  28. $table->integer('image_id')->nullable()->unsigned()->index()->comment('头像对应的图片表 id ');
  29. $table->integer('user_id')->unsigned()->index()->comment('用户id');
  30. $table->timestamps();
  31. });
  32. }
  33. /**
  34. * Reverse the migrations.
  35. *
  36. * @return void
  37. */
  38. public function down()
  39. {
  40. Schema::dropIfExists('user_infos');
  41. }
  42. }