2025_12_19_135428_update_users.php 530 B

1234567891011121314151617181920212223242526
  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. Schema::table('users', function (Blueprint $table) {
  13. $table->integer('last_active_time')->default(0)->comment('最后活跃时间');
  14. });
  15. }
  16. /**
  17. * Reverse the migrations.
  18. */
  19. public function down(): void
  20. {
  21. //
  22. }
  23. };