Insert on postgres autoincrement expects a value

As the title says, I have an ID colum with an auto incrementing interger for an id. By default the insert type is wants me to provide a value but this is normally generated by the DB, any workarounds?
2 Replies
Cat Socks
Cat SocksOP12mo ago
id: serial("id").primaryKey().notNull(),
Angelelz
Angelelz11mo ago
I believe you don't need the .notNull() Or you might need to use .autoIncrement() I don't remember
Want results from more Discord servers?
Add your server