drizzle-pull

Introspect a live database and generate a Drizzle schema from its DDL.

Updated Jul 24, 2026
One-click install
npx skills add https://github.com/saad-tayyab/lumora --skill drizzle-pull-saad-tayyab
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drizzle-pull
Source: https://github.com/saad-tayyab/lumora/tree/main/.agents/skills/drizzle-pull
Command: npx skills add https://github.com/saad-tayyab/lumora --skill drizzle-pull-saad-tayyab

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires drizzle-kit.

What problem does it solve? When adopting Drizzle ORM on a project that already has a live database, you need a schema.ts that matches reality without hand-writing it. This Skill reverse-engineers the existing database into a Drizzle schema, relations file, and snapshot, and decodes the result manifest or connection failures. ## Core Features & Use Cases - Database Introspection: Connect to a live PostgreSQL, MySQL, SQLite, Turso, CockroachDB, SingleStore, or MSSQL database and emit schema.ts, relations.ts, and a snapshot under the configured out directory. - CLI and SDK Forms: Run drizzle-kit pull with flags like --casing, --breakpoints, and --output json, or call the pull() SDK function which returns the same ok/error envelope. - Manifest Decoding: Interpret the paths manifest (schemaPath, snapshotPath, relationsPath, migrationPath) and the credential-redacted database_driver_error envelope. - Use Case: You inherit a legacy PostgreSQL database and want to manage it with Drizzle. Run drizzle-kit pull --output json to generate drizzle/schema.ts and drizzle/relations.ts, then optionally use --init to write the initial migration. ## Quick Start Ask the AI to introspect your existing database with drizzle-kit pull and generate the Drizzle schema files into your configured out directory.

Frequently Asked Questions about drizzle-pull

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a Drizzle schema from an existing database?

Run drizzle-kit pull with your drizzle.config.ts containing the dialect and dbCredentials. It connects to the live database, reads the DDL, and writes schema.ts, relations.ts, and a snapshot into your configured out directory.

What is the difference between drizzle-kit pull and push?

Pull introspects a live database and writes a Drizzle schema from it, while push and generate start from a schema and drive the database. Pull is the reverse direction, used when the database already exists.

Does drizzle-kit pull work with MSSQL databases?

Yes, pull supports MSSQL along with PostgreSQL, MySQL, SQLite, Turso, CockroachDB, and SingleStore. For MSSQL the ok manifest omits relationsPath because no relations file is generated for that dialect.

Why does drizzle-kit pull fail with database_driver_error?

This error means the driver cannot connect or introspection failed. The envelope includes the database name, relevant driver packages, and an optional note, but deliberately excludes connection strings and credentials for security.

Is drizzle-kit pull --init safe to run on a production database?

No, --init is a destructive write that executes DDL against the connected live database, not just disk. It runs the initial migration and adds migrationPath to the manifest, so use it only when you intend to modify the database.