drizzle.config.ts
27 files
Drizzle Kit Configuration
This file configures Drizzle Kit - the CLI tool that handles database
migrations, schema introspection, and the visual database studio.
Aspect | Drizzle ORM | Drizzle Kit |
|---|---|---|
| Purpose | Runtime database queries | Build-time migrations |
| When Used | Application code | Development/deployment |
Package | drizzle-orm | drizzle-kit |
Runs | In production | In development |
Output | Query results | SQL migration files |
Command | Script | Purpose | Output |
|---|---|---|---|
generate | npm run db:generate | Create migration SQL | drizzle/.sql |
push | npm run db:push | Apply to database | Updates DB schema |
studio | npm run db:studio | Visual editor | Opens UI at local.drizzle.studio |
check | drizzle-kit check | Validate schema | Shows errors/warnings |
introspect | drizzle-kit introspect | Reverse engineer | Creates schema from DB |
schema: Path to schema files
out: Migration output directory
driver: Database type
dbCredentials: Connection details
Kit Configuration for Migration Management