我有一个后端项目保存在使用 Drizzle ORM 的存储库中,克隆在 2 台具有最新 Posgtres 映像的 PC(Win 和 MacOS)上。推送架构仅适用于 MacOS,在 Win 上会出现错误
> error: "serial" type does not exists
at \node_modules\drizzle-kit\bin.cjs:24462:21
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async PgPostgres.query (\node_modules\drizzle-kit\bin.cjs:25423:21)
at async Command.<anonymous> (\node_modules\drizzle-kit\bin.cjs:63261:9) {
length: 89,
severity: 'ERRORE',
code: '42704',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
> schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'parse_type.c',
line: '274',
routine: 'typenameType'
我已经尝试过了 删除并克隆存储库 更新节点 重新安装 postgres 映像
两台电脑上的行为应该相同
serial
类型在 Postgres DB 中有一些奇怪的行为,它
"The data types smallserial, serial and bigserial are not true types, but merely a notational convenience for creating unique identifier columns (similar to the AUTO_INCREMENT property supported by some other databases)."
查看更多信息。