pgTable()
stable · v0.30+Defines a Postgres table — a typed schema that drives query inference, migrations, and your IDE's autocomplete. Compose columns with the column helpers in drizzle-orm/pg-core.
import { pgTable, serial, text, timestamp } from 'drizzle-orm/pg-core' export const users = pgTable('users', { id: serial('id').primaryKey(), email: text('email').notNull().unique(), name: text('name'), createdAt: timestamp('created_at') .defaultNow().notNull(), })