Featured artworks thumbnails
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?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::create('academy_lesson_blocks', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->foreignId('lesson_id')->constrained('academy_lessons')->cascadeOnDelete();
|
||||
$table->string('type')->index();
|
||||
$table->string('title')->nullable();
|
||||
$table->json('payload')->nullable();
|
||||
$table->unsignedInteger('sort_order')->default(0)->index();
|
||||
$table->boolean('active')->default(true)->index();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->index(['lesson_id', 'sort_order']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('academy_lesson_blocks');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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::create('academy_ai_comparison_results', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->foreignId('lesson_block_id')->constrained('academy_lesson_blocks')->cascadeOnDelete();
|
||||
$table->string('provider')->nullable();
|
||||
$table->string('model_name')->nullable();
|
||||
$table->string('image_path');
|
||||
$table->string('thumb_path')->nullable();
|
||||
$table->text('settings')->nullable();
|
||||
$table->text('strengths')->nullable();
|
||||
$table->text('weaknesses')->nullable();
|
||||
$table->text('best_for')->nullable();
|
||||
$table->unsignedTinyInteger('score')->nullable();
|
||||
$table->unsignedInteger('sort_order')->default(0)->index();
|
||||
$table->boolean('active')->default(true)->index();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->index(['lesson_block_id', 'sort_order'], 'academy_ai_compare_block_sort_idx');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('academy_ai_comparison_results');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,22 @@
|
||||
<?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('artwork_comments', function (Blueprint $table): void {
|
||||
$table->index(['created_at', 'id'], 'idx_artwork_comments_created_at');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('artwork_comments', function (Blueprint $table): void {
|
||||
$table->dropIndex('idx_artwork_comments_created_at');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user