PostgreSQL "type serial does not exist"
My drizzle schema uses
bigserial("topicid", { mode: "number" })
for the ids of several of my tables.
When I attempt to do db push
, I get the following error:
error: type "bigserial" does not exist
I've checked the migration that I generated previously, and it looks like this,
"id" bigserial PRIMARY KEY NOT NULL,
so I don't think it's a problem with the generated SQL.
I've had this problem with the serial
data type as well.3 Replies
Hello, @Kim Young Jin! Could you please tell me steps that you are doing and your driver, so I will be able to reproduce this issue?
Hi @solo thanks for replying. My drive is postgres.
Steps to reproduce:
Just create a schema with an id fileld that is of type "big serial", like this:
topicid: bigserial("topicid", { mode: "number" }).primaryKey().notNull()
and then db push
it to the postgres dbHonestly, it's a bit strange because I created a simple schema with
id: bigserial('id', { mode: 'number' }).primaryKey()
and then ran drizzle-kit push:pg
, and everything worked out. I used the postgres-js
driver for that.
Could you please provide code of schema file, drizzle config file and file where you connect to the database?