Skip to content

fix duplicate key error during db migration#1

Open
lichao127 wants to merge 2 commits intoquzhi1:mainfrom
lichao127:lichao127/fix-migration
Open

fix duplicate key error during db migration#1
lichao127 wants to merge 2 commits intoquzhi1:mainfrom
lichao127:lichao127/fix-migration

Conversation

@lichao127
Copy link
Copy Markdown

This PR fixes the duplicate key value violates unique constraint "pg_extension_name_index" error during the db migration step in ./install.sh.

Expand for full error message:
⏳ Running migrations...
Applied migration: 0000_yielding_bloodaxe.sql
❌ Migration failed
PostgresError: duplicate key value violates unique constraint "pg_extension_name_index"
    at ErrorResponse (/Users/lichao127/HistoryRAG/node_modules/.pnpm/postgres@3.4.4/node_modules/postgres/cjs/src/connection.js:788:26)
    at handle (/Users/lichao127/HistoryRAG/node_modules/.pnpm/postgres@3.4.4/node_modules/postgres/cjs/src/connection.js:474:6)
    at Socket.data (/Users/lichao127/HistoryRAG/node_modules/.pnpm/postgres@3.4.4/node_modules/postgres/cjs/src/connection.js:315:9)
    at Socket.emit (node:events:507:28)
    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 TCP.onStreamRead (node:internal/stream_base_commons:189:23) {
  severity_local: 'ERROR',
  severity: 'ERROR',
  code: '23505',
  detail: 'Key (extname)=(vector) already exists.',
  schema_name: 'pg_catalog',
  table_name: 'pg_extension',
  constraint_name: 'pg_extension_name_index',
  file: 'nbtinsert.c',
  line: '673',
  routine: '_bt_check_unique'
}
 ELIFECYCLE  Command failed with exit code 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant