Unique key in PG

Hey guys, sorry I have a little dumb question here πŸ™‚

I wanna know how to set my id field in my PG to auto increament.

Here's my schema;
const apiInventory = pgTable("api_inventory", {
  id: serial("id").primaryKey(), //I want this to auto-increament.
  // other columns and field here...
  status: text("status").notNull(),
  created_at: timestamp("created_at").defaultNow().notNull(),
  last_modified: timestamp("last_modified").defaultNow().notNull(),
});

Someone look this up please, not sure I've found the right docs yet.
Was this page helpful?