<?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::table('animes', function (Blueprint $table) {
            // YouTube-benzeri trend skoru — TrendingController::computeScores() hesaplar
            $table->float('trending_score', 10, 2)->default(0)->after('trending_order');
            $table->index('trending_score');
        });
    }

    public function down(): void
    {
        Schema::table('animes', function (Blueprint $table) {
            $table->dropColumn('trending_score');
        });
    }
};
