You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using pg_vector extension the migration generate the following update.
ALTER TABLE "publications" ADD COLUMN "embedding" "vector(512)";
instead of
ALTER TABLE "publications" ADD COLUMN "embedding" vector(512); <= without quote on vector
produce the following error:
PostgresError: type "vector(512)" does not exist
at ErrorResponse (/Users/vgauthier/Documents/TelecomSudParis/TravauxRecherche/Web/React/complexnet/node_modules/.pnpm/postgres@3.4.3/node_modules/postgres/cjs/src/connection.js:790:26)
at handle (/Users/vgauthier/Documents/TelecomSudParis/TravauxRecherche/Web/React/complexnet/node_modules/.pnpm/postgres@3.4.3/node_modules/postgres/cjs/src/connection.js:476:6)
at TLSSocket.data (/Users/vgauthier/Documents/TelecomSudParis/TravauxRecherche/Web/React/complexnet/node_modules/.pnpm/postgres@3.4.3/node_modules/postgres/cjs/src/connection.js:315:9)
at TLSSocket.emit (node:events:518:28)
at TLSSocket.emit (node:domain:488:12)
at addChunk (node:internal/streams/readable:559:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
at Readable.push (node:internal/streams/readable:390:5)
at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23) {
severity_local: 'ERROR',
severity: 'ERROR',
code: '42704',
position: '51',
file: 'parse_type.c',
line: '270',
routine: 'typenameType'
}
pnpm run db:migrate
> complexnet@0.5 db:migrate /Users/vgauthier/Documents/TelecomSudParis/TravauxRecherche/Web/React/complexnet
> tsx src/db/migrate.ts
PostgresError: type "VECTOR(3)" does not exist
at ErrorResponse (/Users/vgauthier/Documents/TelecomSudParis/TravauxRecherche/Web/React/complexnet/node_modules/.pnpm/postgres@3.4.3/node_modules/postgres/cjs/src/connection.js:790:26)
at handle (/Users/vgauthier/Documents/TelecomSudParis/TravauxRecherche/Web/React/complexnet/node_modules/.pnpm/postgres@3.4.3/node_modules/postgres/cjs/src/connection.js:476:6)
at TLSSocket.data (/Users/vgauthier/Documents/TelecomSudParis/TravauxRecherche/Web/React/complexnet/node_modules/.pnpm/postgres@3.4.3/node_modules/postgres/cjs/src/connection.js:315:9)
at TLSSocket.emit (node:events:518:28)
at TLSSocket.emit (node:domain:488:12)
at addChunk (node:internal/streams/readable:559:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
at Readable.push (node:internal/streams/readable:390:5)
at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23) {
severity_local: 'ERROR',
severity: 'ERROR',
code: '42704',
position: '51',
file: 'parse_type.c',
line: '270',
routine: 'typenameType'
}
Expected behavior
ALTER TABLE "publications" ADD COLUMN "embedding" vector(512);
vgauthier
changed the title
[BUG]: migration with pg_vector
[BUG]: generate pg_vector - migration produce wrong vector type string
May 15, 2024
vgauthier
changed the title
[BUG]: generate pg_vector - migration produce wrong vector type string
[BUG]: generate pg_vector - migration produce misspelled string
May 15, 2024
vgauthier
changed the title
[BUG]: generate pg_vector - migration produce misspelled string
[BUG]: generate with pg_vector - migration produce misspelled string
May 15, 2024
What version of
drizzle-orm
are you using?0.30.10
What version of
drizzle-kit
are you using?No response
Describe the Bug
When using pg_vector extension the migration generate the following update.
ALTER TABLE "publications" ADD COLUMN "embedding" "vector(512)";
instead of
ALTER TABLE "publications" ADD COLUMN "embedding" vector(512); <= without quote on vector
produce the following error:
Expected behavior
ALTER TABLE "publications" ADD COLUMN "embedding" vector(512);
Environment & setup
using pgvector-node https://github.com/pgvector/pgvector-node
The text was updated successfully, but these errors were encountered: