2026_01_23_144045_update_activity_user.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. return new class extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::dropIfExists('activity_user');
  15. Schema::create('activity_user', function (Blueprint $table) {
  16. $table->engine = 'InnoDB';
  17. $table->id();
  18. $table->integer('activity_id')->comment('活动ID');
  19. $table->string('title', 150)->comment('活动名称');
  20. $table->string('sub_title', 150)->comment('副标题');
  21. $table->integer('start_time')->comment('开始时间');
  22. $table->integer('end_time')->comment('结束时间');
  23. $table->string('detail_image')->comment('活动详情图片');
  24. $table->integer('part_in_time')->comment('参与时间');
  25. $table->string('member_id')->comment('会员ID');
  26. $table->tinyInteger('status')->default(0)->comment('0互动进行中,1活动结束');
  27. $table->timestamps();
  28. });
  29. }
  30. /**
  31. * Reverse the migrations.
  32. *
  33. * @return void
  34. */
  35. public function down()
  36. {
  37. Schema::dropIfExists('activity_user');
  38. }
  39. };