2018_07_11_055928_create_messages_followers_table.php 942 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateMessagesFollowersTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('messages_followers', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->integer('messages_id')->comment('信息ID');
  17. $table->integer('user_id')->comment('用户ID');
  18. $table->string('username',255)->nullable()->comment('用户名');
  19. $table->string('mobile',11)->nullable()->comment('联系方式');
  20. $table->softDeletes();
  21. $table->timestamps();
  22. });
  23. }
  24. /**
  25. * Reverse the migrations.
  26. *
  27. * @return void
  28. */
  29. public function down()
  30. {
  31. Schema::dropIfExists('messages_followers');
  32. }
  33. }