2019_07_08_124022_create_love_dynamic_table.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateLoveDynamicTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('love_dynamic', function (Blueprint $table) {
  15. $table->bigIncrements('id');
  16. $table->bigInteger('uid')->index()->comment('用户id');
  17. $table->tinyInteger('type')->default(1)->comment('1图片2视频3语音');
  18. $table->softDeletes();
  19. $table->Integer('tid')->default(0)->index()->comment('话题ID');
  20. $table->Integer('view_size')->default(1)->comment('查看数');
  21. $table->Integer('like_size')->default(1)->comment('点赞数');
  22. $table->Integer('comment_size')->default(1)->comment('评论数');
  23. $table->Integer('rose')->default(0)->comment('收费动态');
  24. $table->Integer('status')->default(0)->comment('审核0没审核1审核');
  25. $table->binary('description')->nullable()->comment('描述');
  26. $table->timestamps();
  27. $table->comment = '动态表';
  28. });
  29. }
  30. /**
  31. * Reverse the migrations.
  32. *
  33. * @return void
  34. */
  35. public function down()
  36. {
  37. Schema::dropIfExists('love_dynamic');
  38. }
  39. }