<?php

use Illuminate\Database\Migrations\Migration;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        DB::statement('CREATE INDEX category_embeddings_embedding_hnsw_idx ON categories USING hnsw (embedding vector_cosine_ops)');
        DB::statement('CREATE INDEX background_media_embeddings_embedding_hnsw_idx ON background_medias USING hnsw (embedding vector_cosine_ops)');
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        DB::statement('DROP INDEX IF EXISTS category_embeddings_embedding_hnsw_idx');
        DB::statement('DROP INDEX IF EXISTS background_media_embeddings_embedding_hnsw_idx');
    }
};
