-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility of DoctrineVectorStore with doctrine migration #48
Comments
Example of config that seems to work
But I get an error on length not being define though it is defined in default DoctrineEmbeddingEntityBase I extend. I am using LLPhant v0.2.12 |
Currently using public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE snippet ALTER embedding TYPE vector(1536)');
$this->addSql('COMMENT ON COLUMN snippet.embedding IS NULL');
} |
Hi ! I used this bundle (mainly to get access to DQL functions) : https://packagist.org/packages/partitech/doctrine-pgvector Hope this helps |
Hi o/
As the VectorType type is added to Doctrine on DoctrineVectorStore constructor, it is not available in DoctrineMigration which is not aware of this type. So using
bin/console make:migration
or equivalentbin/console doctrine:migration:diff
result in error:Unknown column type "vector" requested.
One option seems to move the type declaration to doctrine dbal config file, with consequence to make the VectorType always available to doctrine. This is mostly adding some config info on the readme and maybe remove the integration in DoctrineVectorStore class.
If this proposition is OK for you I can open a PR
The text was updated successfully, but these errors were encountered: