prediction with context
This commit is contained in:
@@ -14,7 +14,7 @@ return new class extends Migration
|
||||
Schema::create('price_predictions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->date('predicted_for')->comment('The date this prediction covers');
|
||||
$table->enum('source', ['llm', 'ewma']);
|
||||
$table->enum('source', ['llm', 'llm_with_context', 'ewma']);
|
||||
$table->enum('direction', ['rising', 'falling', 'flat']);
|
||||
$table->tinyInteger('confidence')->unsigned()->comment('0–100 confidence score');
|
||||
$table->text('reasoning')->nullable()->comment('LLM explanation or EWMA summary');
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user