<?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('migration_game_plan', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('wp_game_id');
            $table->unsignedBigInteger('wp_platform_id');
            $table->unsignedBigInteger('game_id')->nullable();
            $table->unsignedBigInteger('wp_genre_id')->nullable();
            $table->unsignedInteger('post_count')->default(0);
            $table->boolean('genre_conflict')->default(false);
            $table->timestamps();

            $table->unique(['wp_game_id', 'wp_platform_id']);
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('migration_game_plan');
    }
};
