2025_12_18_173552_update_users_table.php 641 B

123456789101112131415161718192021222324252627282930
  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->string('flag')
  15. ->default(0) // 默认
  16. ->after('status')
  17. ->comment('人员类型:0=普通会员,1=管理会员');
  18. });
  19. }
  20. /**
  21. * Reverse the migrations.
  22. */
  23. public function down(): void
  24. {
  25. //
  26. }
  27. };