2026_01_22_150536_update_activity_rewards.php 985 B

12345678910111213141516171819202122232425262728293031323334353637
  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. * Run the migrations.
  8. *
  9. * @return void
  10. */
  11. public function up()
  12. {
  13. Schema::dropIfExists('activity_rewards');
  14. Schema::create('activity_rewards', function (Blueprint $table) {
  15. $table->engine = 'InnoDB';
  16. $table->id();
  17. $table->string('title', 150)->comment('活动名称');
  18. $table->string('sub_title', 150)->comment('副标题');
  19. $table->integer('start_time')->comment('开始时间');
  20. $table->integer('end_time')->comment('结束时间');
  21. $table->string('detail_image')->comment('活动详情图片');
  22. $table->timestamps();
  23. });
  24. }
  25. /**
  26. * Reverse the migrations.
  27. *
  28. * @return void
  29. */
  30. public function down()
  31. {
  32. //
  33. }
  34. };