3 use Illuminate\Database\Migrations\Migration;
4 use Illuminate\Database\Schema\Blueprint;
5 use Illuminate\Support\Facades\Schema;
7 return new class extends Migration
12 public function up(): void
14 // TODO - Handle compatibility with older databases that don't support vectors
15 Schema::create('search_vectors', function (Blueprint $table) {
16 $table->string('entity_type', 100);
17 $table->integer('entity_id');
19 $table->vector('embedding');
21 $table->index(['entity_type', 'entity_id']);
26 * Reverse the migrations.
28 public function down(): void
30 Schema::dropIfExists('search_vectors');