fix: pgvector deployment — idempotent migration, pgvector image, schema sync
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m21s
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m21s
- docker-compose.yml: switch postgres:16-alpine to pgvector/pgvector:pg16
- migration: rewrite with IF NOT EXISTS guards, DO block for safe
text→vector(1536) conversion, handles partial/re-run states
- schema.prisma (both): add @default(now()) on NoteEmbedding.updatedAt,
sync mcp-server embedding type to Unsupported("vector(1536)")
- deploy.yaml: add docker compose pull postgres before build
This commit is contained in:
@@ -129,11 +129,12 @@ model Note {
|
||||
}
|
||||
|
||||
model NoteEmbedding {
|
||||
id String @id @default(cuid())
|
||||
noteId String @unique
|
||||
embedding String
|
||||
createdAt DateTime @default(now())
|
||||
note Note @relation(fields: [noteId], references: [id], onDelete: Cascade)
|
||||
id String @id @default(cuid())
|
||||
noteId String @unique
|
||||
embedding Unsupported("vector(1536)")
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @default(now()) @updatedAt
|
||||
note Note @relation(fields: [noteId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([noteId])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user