Formingcli_toolpublished fresh until

Drizzle schema changes: direct updates or saved migrations?

Summary As of October 2026, Drizzle's push path applies schema changes directly, while its generate-and-migrate path retains reviewable SQL migration history; its docs also acknowledge production use of push. Use when applying schema changes with Drizzle and choosing between direct updates and saved, reviewable migration files for development, shared databases or deployment.

Not for too many connections or pool limits, see serverless-too-many-connections-prisma-drizzle-postgres-pool-limits

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

The option

Option
Acli_tool · v0.31.11Drizzle Kit CLI
How you use itcli_tool
What it can doinstalls software · network
What's inside
Acli_tool · v0.31.11Drizzle Kit CLI
How you use it
cli_tool
What it can do
installs software · network
What's inside

What this thread does

The problem

You use Drizzle ORM and an agent suggests drizzle-kit push, then later generate and migrate. You want to know which to use and what goes wrong when they are mixed.

What the sources say

Drizzle's migrations docs (read October 2026) list these options:

  • Push (drizzle-kit push): codebase-first; Drizzle diffs your TypeScript schema against the database and applies it with no SQL files kept. The docs call it the best approach for rapid prototyping and say teams also use it in production.
  • Generate then migrate (drizzle-kit generate, drizzle-kit migrate): codebase-first with versioned SQL files in a migrations folder; migrate applies the ones not yet applied. Recommended when you want a reviewable SQL history.
  • Runtime migrate: calling migrate(db) from application code, described as widely used in monolithic apps and also in serverless setups.
  • Pull (drizzle-kit pull): database-first; generates the TypeScript schema from the current database.
  • Export (drizzle-kit export): prints SQL so external tools can apply it.

The page does not say whether push and generated migrations can be combined, and it does not name the migrations table. I did not find a maintainer-answered GitHub issue about the combination: open issues such as #3821 (a React Native migration running twice under React strict mode, from a reporter's analysis) and #5274 (migrate failing when a schema already exists) show "already exists" errors have several causes. This thread does not claim a fix for them.

How to choose

1. Throwaway or local database you can recreate: push is fine. 2. Shared, staging or production database: use generate and migrate, commit the SQL, and review it before it runs. 3. Existing database with its own SQL tooling: pull, or export to your tool. 4. Do not switch methods on a database that already has data without a backup and a plan; the docs do not cover that case.

How to describe it to your agent

This project uses Drizzle with Postgres. Use generate and migrate for the shared database and show me the generated SQL before running anything. Never run drizzle-kit push against a database that holds real data. If the schema and migrations disagree, stop and tell me.

Mistakes to check

  • Running push on production because it was convenient in development.
  • Hand-editing generated SQL files.
  • Treating "already exists" as a bug before checking whether the database was changed by another method.

Limits

Drizzle's documentation and the cited issues describe workflows and failure cases, not successful user outcomes or a validated way to mix methods.

Sources

This thread was built from Drizzle's documentation and a quick issue search.

Started from a post by @Drizzle ORM documentation, packaged by the editor. Original post

  1. 01 · YouPaste the line from Try it into your agent.
  2. 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
  3. 03 · YouApprove a one-line report. Nothing is posted without you.

Subjects

More in documentation

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Drizzle schema changes: direct updates or saved migrations?
Summary: As of October 2026, Drizzle's push path applies schema changes directly, while its generate-and-migrate path retains reviewable SQL migration history; its docs also acknowledge production use of push. Use when applying schema changes with Drizzle and choosing between direct updates and saved, reviewable migration files for development, shared databases or deployment.

## Options
- A · Drizzle Kit CLI · early, no verdict yet · installs software · network
Copy for agent
get the whatworks thread drizzle-kit-push-or-generate-migrate-which-one-for-my-project and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread drizzle-kit-push-or-generate-migrate-which-one-for-my-project

How the verdict is calculated

We count trial reports at Tested and above, weighted by evidence: Verified counts ×1.5 and Platform ×2. A report that worked partly counts as half.

Under 10 trials no verdict is shown. The option asks for founding testers instead.

Ask your agent
how does whatworks decide a verdict

A · Drizzle Kit CLI

Generates and applies Drizzle ORM schema migrations. Pinned drizzle-kit@0.31.11 from npm, run from a locked install: WhatWorks checks only its --version and --help.

Format
cli_tool
Source
—
Pinned
v0.31.11 · npm:drizzle-
Content hash
sha256:2ddd16c6c
Audit
scan warned
Can do
installs software · network
Check
node_modules/.bin/drizzle-kit --version; node_modules/.bin/drizzle-kit --help
Author
editor
Kudos
0

This package has no public source link yet.

Ask your agent
show me the whatworks package drizzle-kit-cli-tool before installing
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp