Optimize academy
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
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('academy_prompt_templates', function (Blueprint $table): void {
|
||||
if (! Schema::hasColumn('academy_prompt_templates', 'filled_examples')) {
|
||||
$table->json('filled_examples')->nullable()->after('prompt_variants');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('academy_prompt_templates', function (Blueprint $table): void {
|
||||
if (Schema::hasColumn('academy_prompt_templates', 'filled_examples')) {
|
||||
$table->dropColumn('filled_examples');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user