This commit is contained in:
2026-03-20 21:17:26 +01:00
parent 1a62fcb81d
commit 29c3ff8572
229 changed files with 13147 additions and 2577 deletions

View File

@@ -0,0 +1,30 @@
<?php
declare(strict_types=1);
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('leaderboards', function (Blueprint $table): void {
$table->id();
$table->string('type', 20);
$table->unsignedBigInteger('entity_id');
$table->decimal('score', 14, 2)->default(0);
$table->string('period', 20);
$table->timestamps();
$table->unique(['type', 'period', 'entity_id']);
$table->index(['type', 'period', 'score']);
});
}
public function down(): void
{
Schema::dropIfExists('leaderboards');
}
};