| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateLoveDynamicTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('love_dynamic', function (Blueprint $table) {
- $table->bigIncrements('id');
- $table->bigInteger('uid')->index()->comment('用户id');
- $table->tinyInteger('type')->default(1)->comment('1图片2视频3语音');
- $table->softDeletes();
- $table->Integer('tid')->default(0)->index()->comment('话题ID');
- $table->Integer('view_size')->default(1)->comment('查看数');
- $table->Integer('like_size')->default(1)->comment('点赞数');
- $table->Integer('comment_size')->default(1)->comment('评论数');
- $table->Integer('rose')->default(0)->comment('收费动态');
- $table->Integer('status')->default(0)->comment('审核0没审核1审核');
- $table->binary('description')->nullable()->comment('描述');
- $table->timestamps();
- $table->comment = '动态表';
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('love_dynamic');
- }
- }
|