2017_05_30_203526_create_user_info_table.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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->integer('site_id')->nullable()->comment('站点ID');
  21. $table->char('nickname', 64)->nullable()->comment('微信昵称');
  22. $table->char('openid', 64)->nullable()->comment('微信openid');
  23. $table->char('mobile', 11)->comment('手机号');
  24. $table->string('avatar', 255)->comment('用户头像');
  25. $table->dateTime('last_login_time')->nullable()->comment('最后一次登录时间');
  26. $table->string('remember_token', 255)->nullable();
  27. $table->timestamps();
  28. $table->softDeletes();
  29. $table->index('deleted_at', 'idx_deleted_at');
  30. });
  31. }
  32. /**
  33. * Reverse the migrations.
  34. *
  35. * @return void
  36. */
  37. public function down()
  38. {
  39. Schema::dropIfExists('user_info');
  40. }
  41. }