a bit of progress

This commit is contained in:
2026-07-04 17:09:55 +03:00
parent f6e7d37428
commit 082b532d52
29 changed files with 2734 additions and 47 deletions
@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('cooldowns', function (Blueprint $table) {
$table->id();
$table->foreignId('character_id')->constrained('characters')->onDelete('cascade');
$table->string('action_type'); // attack, crime, travel, train, etc.
$table->timestamp('last_action_at')->useCurrent();
$table->timestamps();
$table->unique(['character_id', 'action_type']);
$table->index('character_id');
$table->index('action_type');
$table->index('last_action_at');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('cooldowns');
}
};