2017_05_30_203526_create_user_info_table.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. /**
  6. * Migration auto-generated by Sequel Pro Laravel Export
  7. * @see https://github.com/cviebrock/sequel-pro-laravel-export
  8. */
  9. class CreateUserInfoTable extends Migration
  10. {
  11. /**
  12. * Run the migrations.
  13. *
  14. * @return void
  15. */
  16. public function up()
  17. {
  18. Schema::create('user_info', function (Blueprint $table) {
  19. $table->increments('id')->comment('用户ID');
  20. $table->char('nickname', 64)->nullable()->comment('微信昵称');
  21. $table->char('openid', 64)->nullable()->comment('微信openid');
  22. $table->char('mobile', 11)->comment('手机号');
  23. $table->string('avatar', 255)->comment('用户头像');
  24. $table->dateTime('last_login_time')->nullable()->comment('最后一次登录时间');
  25. $table->string('remember_token', 255)->nullable();
  26. $table->timestamps();
  27. $table->softDeletes();
  28. $table->index('deleted_at', 'idx_deleted_at');
  29. });
  30. }
  31. /**
  32. * Reverse the migrations.
  33. *
  34. * @return void
  35. */
  36. public function down()
  37. {
  38. Schema::dropIfExists('user_info');
  39. }
  40. }