Create a new Drizzle schema file with table definitions
Generates Drizzle ORM schema files with TypeScript types and Postgres column definitions.
/plugin marketplace add marcioaltoe/claude-craftkit/plugin install db-tools@claude-craftkitGenerate a new Drizzle ORM schema file with proper TypeScript types and Postgres column definitions.
src/db/schema/ or lib/db/schema/)drizzle-kit generate:pg to create migrationsimport { pgTable, serial, text, timestamp, varchar } from "drizzle-orm/pg-core";
export const users = pgTable("users", {
id: serial("id").primaryKey(),
name: varchar("name", { length: 255 }).notNull(),
email: varchar("email", { length: 255 }).notNull().unique(),
createdAt: timestamp("created_at").defaultNow().notNull(),
updatedAt: timestamp("updated_at").defaultNow().notNull(),
});
export type User = typeof users.$inferSelect;
export type NewUser = typeof users.$inferInsert;
Ensure proper column types, constraints, and TypeScript type inference.