Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 3 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

Drizzle Kit

CLI migration tool for Drizzle ORM that auto-generates SQL migrations intelligently.

Databases, ORMs and clientsNPM

GitHubWebsite

1. License

License from npm.

github.com/drizzle-team/drizzle-orm

From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error

What Drizzle Kit does

Drizzle Kit is the command-line half of Drizzle: it reads the TypeScript schema you already wrote for the ORM, then either writes SQL migration files from it or applies the change straight to the database.

Drizzle Kit popularity

86 / 100
Gid Score, #35 overall
41.6M
downloads a week, npm
36.4K
GitHub stars
244
agent projects use it
Drizzle Kit: downloads per weeknpm, drizzle-kit 41,642,549
Drizzle Kit: GitHub starsdrizzle-team/drizzle-orm 36,369

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How Drizzle Kit is used

  • Drizzle Kit is a dependency in 244 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (5.0% of the 4,867 JavaScript/TypeScript ones), #4 of 120 in databases, orms and clients.
  • Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 792; those are left out of every share on this page.
  • Projects that use it most often also use Drizzle ORM (98.0%), Zod (78.3%), Class Variance Authority (55.3%).
  • It is more common in projects set up for OpenCode (7.3%) than for OpenClaw (3.0%).

By coding agent

142 projects, 4.3%
109 projects, 4.5%
109 projects, 3.6%
25 projects, 7.3%
18 projects, 3.8%
16 projects, 3.4%
11 projects, 3.9%
10 projects, 3.0%

Often used with

In 98.0% of its projects
In 78.3% of its projects
In 55.3% of its projects
In 52.9% of its projects
In 59.4% of its projects
In 76.6% of its projects
In 59.0% of its projects
In 51.6% of its projects

Drizzle Kit in practice

Strengths

Migration files or a direct push

The README describes two paths. Kit can write SQL migration files for you to commit and apply later, or it can apply the schema change to the database directly.

Structural SQL comes from a schema diff

Storyie uses <code>drizzle-kit generate</code> for every structural change: new tables and columns, type changes, indexes and foreign keys. Kit compares the schema with its previous state and writes the SQL, so no one hand-writes DDL.

Blank migrations for data changes

<code>generate --custom</code> skips the diff and creates an empty SQL file for you to fill in by hand. Storyie used these files for seed rows, back-fills, row copies and Stripe price updates.

Postgres Row-Level Security since Kit v0.27.0

According to the release note, Kit v0.27.0 added Row-Level Security support for PostgreSQL. It covers managing roles and policies and enabling RLS for tables and views.

Watch out for

No migrate-down command

Storyie notes that Kit has no way to migrate down. Their fallbacks: <code>drizzle-kit drop</code> for files that have been generated but not applied, a forward fix for applied ones, and Supabase point-in-time recovery for data loss.

Supabase needs the roles provider flag

Storyie calls <code>entities.roles.provider: "supabase"</code> in the config "not optional". Without it, they write, the generated SQL can clash with Supabase's roles or produce malformed policy statements.

Generated SQL still needs a read

Storyie reviews every auto-generated file before committing. Their reason: the diff can produce something unexpected, such as recreating a column where you expected an in-place change.

Schema example from the Drizzle overview (shown beside a migration.sql tab)

// manage your schema
export const countries = pgTable ( 'countries' , {
id : serial () .primaryKey () ,
name : varchar ({ length : 256 }) ,
});
export const cities = pgTable ( 'cities' , {
id : serial () .primaryKey () ,
name : varchar ({ length : 256 }) ,
countryId : integer ( 'country_id' ) .references (() => countries .id) ,
});

More about Drizzle Kit

Funding
  • GitHub Sponsors: https://github.com/drizzle-team
  • 68 GitHub sponsors

See all

Packages around it
  • drizzle-orm: TypeScript ORM
  • zod: Schema validation
  • tailwind-merge: Tailwind class merging
  • class-variance-authority: Component variants
  • clsx: className builder
  • tsx: TypeScript runner
More in Databases, ORMs and clients

Alternatives

Drizzle Kit This page

MITGid 8641.6M/wk

Compare Drizzle Kit with another tool

Get started

Install it.

npm install drizzle-kit

Rules for your agent

Paste into AGENTS.md or CLAUDE.md
## Drizzle Kit
- Make structural changes in the TypeScript schema, then run `drizzle-kit generate` to write the SQL migration. Do not hand-write DDL for schema changes.
- Put data changes (seeds, back-fills, row copies) in files from `drizzle-kit generate --custom`. Never mix DDL and DML in one migration.
- Read every generated SQL file before committing. Watch for a column being recreated where you expected an in-place alteration.
- Write custom migration SQL so it is safe to re-run, for example with `ON CONFLICT DO NOTHING`.
- On Supabase, set `entities.roles.provider: "supabase"` in `drizzle.config.ts`, and declare RLS in the schema with `.enableRLS()` so policies generate with the table.
- There is no migrate-down command. Use `drizzle-kit drop` only for generated files that have not been applied. Fix applied migrations with a new forward migration.
- For Expo SQLite, OP SQLite or React Native, follow the Get Started guide for migrations.