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 SocksOP11mo ago
id: serial("id").primaryKey().notNull(),
Angelelz
Angelelz10mo 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