fix: Add CREATE EXTENSION vector to migration 0104
This commit is contained in:
@@ -19,6 +19,9 @@ down_revision = "0103"
|
|||||||
def upgrade() -> None:
|
def upgrade() -> None:
|
||||||
conn = op.get_bind()
|
conn = op.get_bind()
|
||||||
|
|
||||||
|
# 0. Ensure pgvector extension is installed
|
||||||
|
op.execute("CREATE EXTENSION IF NOT EXISTS vector")
|
||||||
|
|
||||||
# 1. Add embedding column to contacts (if not exists)
|
# 1. Add embedding column to contacts (if not exists)
|
||||||
result = conn.execute(sa.text(
|
result = conn.execute(sa.text(
|
||||||
"SELECT column_name FROM information_schema.columns "
|
"SELECT column_name FROM information_schema.columns "
|
||||||
|
|||||||
Reference in New Issue
Block a user