Skip to content

Commit 83fae6f

Browse files
committed
Improved Doctrine docs [skip ci]
1 parent 806f031 commit 83fae6f

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@ $config->addCustomNumericFunction('hamming_distance', 'Pgvector\Doctrine\Hamming
139139
$config->addCustomNumericFunction('jaccard_distance', 'Pgvector\Doctrine\JaccardDistance');
140140
```
141141

142+
Enable the extension
143+
144+
```php
145+
$entityManager->getConnection()->executeStatement('CREATE EXTENSION IF NOT EXISTS vector');
146+
```
147+
142148
Update your model
143149

144150
```php

tests/DoctrineTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public static function setUpBeforeClass(): void
3838
], $config);
3939

4040
$entityManager = new EntityManager($connection, $config);
41+
$entityManager->getConnection()->executeStatement('CREATE EXTENSION IF NOT EXISTS vector');
4142

4243
Type::addType('vector', 'Pgvector\Doctrine\VectorType');
4344
Type::addType('halfvec', 'Pgvector\Doctrine\HalfVectorType');

0 commit comments

Comments
 (0)