id(); $table->foreignUuid('room_id')->constrained()->cascadeOnDelete(); $table->foreignId('user_id')->nullable()->constrained()->nullOnDelete(); $table->string('name', 50); $table->boolean('is_moderator')->default(false); $table->timestamp('last_seen_at')->nullable(); $table->timestamps(); $table->unique(['room_id', 'name']); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('players'); } };