Files
cleargame/database/migrations/0000_00_00_000000_create_games_table.php
T
2025-04-09 23:03:16 +03:00

31 lines
949 B
PHP

<?php
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('games', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('igdb_id')->unique();
$table->string('name');
$table->text('summary')->nullable();
$table->string('cover_url')->nullable();
$table->string('slug')->nullable();
$table->json('genres')->nullable();
$table->json('platforms')->nullable();
$table->date('first_release_date')->nullable();
$table->float('rating')->nullable();
$table->integer('rating_count')->nullable();
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('games');
}
};