neon-drizzle

Configures Drizzle ORM with provisioned Neon databases including schemas and migrations.

Updated Sep 2, 2026
One-click install
npx skills add https://github.com/ZubairImtiaz3/Safar-E-Iman-Portal --skill neon-drizzle-zubairimtiaz3
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: neon-drizzle
Source: https://github.com/ZubairImtiaz3/Safar-E-Iman-Portal/tree/main/.agents/skills/neon-drizzle
Command: npx skills add https://github.com/ZubairImtiaz3/Safar-E-Iman-Portal --skill neon-drizzle-zubairimtiaz3

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires drizzle-orm, @neondatabase/serverless, drizzle-kit, dotenv, ws, and includes scripts (resource) and references (resource) components.

What problem does it solve? Setting up Drizzle ORM with a Neon Postgres database involves many error-prone steps: provisioning credentials, choosing the right connection adapter, configuring environment loading, and running migrations. This Skill automates the entire workflow so you end up with working code that can immediately query the database. ## Core Features & Use Cases - Guided Setup Workflows: Step-by-step guides for new projects, existing applications, and schema-only changes, with automatic detection of your package manager, framework, and deployment target. - Adapter Selection: Automatically chooses between HTTP (Vercel/Edge) and WebSocket (Node.js servers) adapters based on your environment, with full reference documentation. - Schema & Migration Automation: Generates type-safe schemas with relations, creates migration files, and runs them against your Neon database with troubleshooting support. - Use Case: Tell it "Setup Drizzle for my Next.js blog on Vercel" and it provisions a Neon database, installs dependencies, writes the connection code, generates a blog schema with users and posts, and runs the migrations. ## Quick Start Ask the assistant to set up Drizzle ORM with a Neon database for your project, describing your framework and what tables you need.

Frequently Asked Questions about neon-drizzle

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

FAQPage Schema
How do I set up Drizzle ORM with a Neon database?

Install drizzle-orm, @neondatabase/serverless, and drizzle-kit, then provision a Neon database and write the connection string to your environment file. Create a drizzle.config.ts with explicit dotenv loading, define your schema, and run drizzle-kit generate followed by drizzle-kit migrate.

Should I use the HTTP or WebSocket adapter for Neon with Drizzle?

Use the HTTP adapter for serverless and edge environments like Vercel, Cloudflare Workers, and AWS Lambda. Use the WebSocket adapter for long-lived Node.js servers like Express or Fastify when you need transactions, prepared statements, and connection pooling.

Why does drizzle-kit fail with 'url: undefined' during migrations?

This happens because drizzle-kit runs as a separate process and does not inherit your environment variables. Fix it by adding dotenv config with an explicit path in drizzle.config.ts, such as config({ path: '.env.local' }), matching your actual environment file name.

Can I add Drizzle to a project that already uses another ORM?

Yes, Drizzle can coexist with Prisma, TypeORM, or other ORMs by keeping it in an isolated directory and exporting the connection under a distinct name. You can define schemas for new tables only, or mirror existing tables to gradually migrate queries without running conflicting migrations.

Does the Neon HTTP adapter support database transactions?

No, the HTTP adapter does not support transactions, prepared statements, or streaming. Use batch operations for multiple writes, or switch to the WebSocket adapter with a connection pool if your application requires atomic transactions.

How do I rename a column in Drizzle without losing data?

Drizzle interprets renames as a drop plus add, which deletes data. Generate the migration, then manually edit the SQL file to use ALTER TABLE ... RENAME COLUMN instead before applying it with drizzle-kit migrate.