serial type invalid in psql

im trying to use serial type for my id column to enable auto-incremental id, but when migrating the schema it throws error saying type "serial" doesnt exist
import { serial, boolean, text, pgTable } from "drizzle-orm/pg-core";

export const todos = pgTable("todos", {
id: serial("id").primaryKey(),
content: text("content").notNull(),
completed: boolean("completed").default(false).notNull(),
});
import { serial, boolean, text, pgTable } from "drizzle-orm/pg-core";

export const todos = pgTable("todos", {
id: serial("id").primaryKey(),
content: text("content").notNull(),
completed: boolean("completed").default(false).notNull(),
});
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server