2026_02_02_143549_update_activity_user.php 741 B

1234567891011121314151617181920212223242526272829303132
  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::table('activity_user', function (Blueprint $table) {
  14. $table->decimal('betting_amount', 10)->default(0)->comment('打码量');
  15. });
  16. DB::statement('ALTER TABLE bot_activity_user MODIFY COLUMN effective_betting_amount decimal(10,2) NOT NULL DEFAULT 0 COMMENT "用户已完成的打码量"');
  17. }
  18. /**
  19. * Reverse the migrations.
  20. *
  21. * @return void
  22. */
  23. public function down()
  24. {
  25. //
  26. }
  27. };