Skip to content

Commit 7e8868f

Browse files
authored
Merge pull request #12120 from bdach/mp-history/table-for-events
Add database table for storing lazer multiplayer room events
2 parents 7ca076a + e7ace3a commit 7e8868f

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
4+
// See the LICENCE file in the repository root for full licence text.
5+
6+
declare(strict_types=1);
7+
8+
use Illuminate\Database\Migrations\Migration;
9+
use Illuminate\Database\Schema\Blueprint;
10+
use Illuminate\Support\Facades\Schema;
11+
12+
return new class extends Migration
13+
{
14+
/**
15+
* Run the migrations.
16+
*/
17+
public function up(): void
18+
{
19+
Schema::create('multiplayer_realtime_room_events', function (Blueprint $table) {
20+
$table->bigIncrements('id');
21+
$table->unsignedBigInteger('room_id');
22+
$table->string('event_type');
23+
$table->unsignedBigInteger('playlist_item_id')->nullable();
24+
$table->unsignedInteger('user_id')->nullable();
25+
$table->timestamps();
26+
$table->json('event_detail')->nullable();
27+
});
28+
}
29+
30+
/**
31+
* Reverse the migrations.
32+
*/
33+
public function down(): void
34+
{
35+
Schema::dropIfExists('multiplayer_realtime_room_events');
36+
}
37+
};

0 commit comments

Comments
 (0)