postgresqldrizzledrizzle-orm

error: password authentication failed for user "postgres" drizzle migration


I'm using drizzle for a my ORM and I'm able to generate migrations successfully how ever when I try to push the migrations this is the error I get:

    error: password authentication failed for user "postgres"
    at D:\code\toni\inventory\server\node_modules\pg-pool\index.js:45:11
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at PgDialect.migrate (D:\code\toni\inventory\server\node_modules\src\pg-core\dialect.ts:61:3)
    at migrate (D:\code\toni\inventory\server\node_modules\src\node-postgres\migrator.ts:10:2)
    at main (d:\code\toni\inventory\server\src\db\migrate.ts:15:3) {
  length: 104,
  severity: 'FATAL',
  code: '28P01',
  detail: undefined,
  hint: undefined,
  position: undefined,
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  schema: undefined,
  table: undefined,
  column: undefined,
  dataType: undefined,
  constraint: undefined,
  file: 'auth.c',
  line: '326',
  routine: 'auth_failed'
}                      

My connection string is as follows: postgresql://postgres:postgres@localhost:5432/testDB?schema=public


Solution

  • I figured it out. Turns out I was migrating my schema to the local instance of postgres rather than my docker postgres instance. I uninstalled it and that did the trick.