id(); $table->unsignedBigInteger('igdb_id')->unique()->nullable(); $table->string('slug')->unique(); $table->string('title'); $table->text('summary')->nullable(); $table->string('cover_url')->nullable(); $table->string('cover_thumb_url')->nullable(); $table->date('release_date')->nullable(); $table->string('release_year', 4)->nullable(); $table->decimal('rating_avg', 4, 2)->nullable()->default(null); $table->unsignedInteger('rating_count')->default(0); $table->unsignedInteger('review_count')->default(0); $table->unsignedInteger('library_count')->default(0); $table->string('status')->default('published'); // published|pending|hidden $table->timestamps(); $table->index(['rating_avg', 'rating_count']); $table->index('release_year'); }); } public function down(): void { Schema::dropIfExists('games'); } };