Migration failure on fresh DB

I'm currently experiencing a migration failure on a fresh Postgres DB with both postgres.js and node-postgres. It's complaining that an enum I have defined in my schema (which should have created already as it's in the generated migration) does not exist.

⌛ Running Migrations
❌ Migration Failed
error: type "grandcompany" does not exist
    at Parser.parseErrorMessage (g:\code\htg-app\node_modules\.pnpm\pg-protocol@1.6.0\node_modules\pg-protocol\dist\parser.js:287:98)
    at Parser.handlePacket (g:\code\htg-app\node_modules\.pnpm\pg-protocol@1.6.0\node_modules\pg-protocol\dist\parser.js    at Socket.<anonymous> (g:\code\htg-app\node_modules\.pnpm\pg-protocol@1.6.0\node_modules\pg-protocol\dist\index.js:11:42)
    at Socket.emit (node:events:512:28)
    at Socket.emit (node:domain:489:12)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
    at Readable.push (node:internal/streams/readable:234:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
  length: 101,
  severity: 'ERROR',
  code: '42704',
  detail: undefined,
  hint: undefined,
  position: '1817',
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  schema: undefined,
  table: undefined,
  column: undefined,
  dataType: undefined,
  constraint: undefined,
  file: 'parse_type.c',
  line: '270',
  routine: 'typenameType'
}
Was this page helpful?