-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
PHP Drivers
-
None
-
None
-
None
-
None
-
None
-
None
Laravel 13.x introduces Schema::ensureVectorExtensionExists() to verify that the vector extension is available before creating vector columns/indexes (PostgreSQL: checks pgvector). For MongoDB, the equivalent is to check that Atlas Search is available on the current connection.
Proposed implementation:
The method should attempt a lightweight Atlas Search operation (e.g. listSearchIndexes) and throw a descriptive exception if Atlas Search is not supported, reusing the existing Builder::isAtlasSearchNotSupportedException() logic.
// Throws if Atlas Search is not available \(not an Atlas cluster\) Schema::ensureVectorExtensionExists\(\); Schema::create\('collection', function \(Blueprint $collection\) { $collection\->vectorIndex\(\[...\], 'my\_vector\_index'\); }\);
Reference: https://laravel.com/docs/13.x/migrations#column-method-vector
- is related to
-
PHPORM-506 Add Blueprint::vectorIndex() and Blueprint::dropVectorIndex() as aliases, deprecate vectorSearchIndex()
-
- Needs Triage
-