<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

return new class extends Migration
{
    public function up(): void
    {
        if (DB::getDriverName() !== 'sqlite') {
            DB::statement("ALTER TABLE price_predictions MODIFY COLUMN source ENUM('llm', 'llm_with_context', 'ewma') NOT NULL");
        }
    }

    public function down(): void
    {
        if (DB::getDriverName() !== 'sqlite') {
            DB::statement("ALTER TABLE price_predictions MODIFY COLUMN source ENUM('llm', 'ewma') NOT NULL");
        }
    }
};
