2025_12_17_155333_update_users_table.php 532 B

12345678910111213141516171819202122232425262728
  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. public function up(): void
  11. {
  12. //
  13. Schema::table('users', function (Blueprint $table) {
  14. $table->decimal('balance', 15, 4)->change()->comment('用户余额');
  15. });
  16. }
  17. /**
  18. * Reverse the migrations.
  19. */
  20. public function down(): void
  21. {
  22. //
  23. }
  24. };