Merge pull request #808 from AppFlowy-IO/fix/pg-migration

fix: migration for db without pgvector
This commit is contained in:
Zack 2024-09-10 11:04:32 +08:00 committed by GitHub
commit cd3cd717bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -1 +0,0 @@
CREATE INDEX af_collab_embeddings_oid_idx ON public.af_collab_embeddings (oid);

View File

@ -0,0 +1,6 @@
DO $$
BEGIN
CREATE INDEX IF NOT EXISTS af_collab_embeddings_oid_idx ON public.af_collab_embeddings (oid);
EXCEPTION WHEN others THEN
RAISE NOTICE 'could not create index on af_collab_embeddings(oid), ignoring this migration';
END $$;