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
Mykhailo
Mykhailo12mo ago
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?
Kim Young Jin
Kim Young JinOP12mo ago
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 db
Mykhailo
Mykhailo12mo ago
Honestly, 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?
Want results from more Discord servers?
Add your server