2026_02_02_143549_update_activity_user.php 775 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. use Illuminate\Support\Facades\DB;
  6. return new class extends Migration {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::table('activity_user', function (Blueprint $table) {
  15. $table->decimal('betting_amount', 10)->default(0)->comment('打码量');
  16. });
  17. DB::statement('ALTER TABLE bot_activity_user MODIFY COLUMN effective_betting_amount decimal(10,2) NOT NULL DEFAULT 0 COMMENT "用户已完成的打码量"');
  18. }
  19. /**
  20. * Reverse the migrations.
  21. *
  22. * @return void
  23. */
  24. public function down()
  25. {
  26. //
  27. }
  28. };