neon-drizzle
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseNeon Drizzle Integration
Neon与Drizzle集成
Comprehensive Drizzle ORM setup for Neon databases with guided workflows.
为Neon数据库提供全面的Drizzle ORM设置流程及引导式工作流。
When to Use This Skill
何时使用此技能
- Setting up Drizzle in a new project (Next.js, Vite, Express, etc.)
- Integrating Drizzle into an existing application
- Creating or modifying database schemas
- Troubleshooting migration issues
- 在新项目(Next.js、Vite、Express等)中设置Drizzle
- 将Drizzle集成到现有应用中
- 创建或修改数据库模式
- 排查迁移问题
Code Generation Rules
代码生成规则
When generating TypeScript/JavaScript code:
- BEFORE generating import statements, check tsconfig.json for path aliases (compilerOptions.paths)
- If path aliases exist (e.g., "@/": ["./src/"]), use them (e.g., import { x } from '@/lib/utils')
- If NO path aliases exist or unsure, ALWAYS use relative imports (e.g., import { x } from '../../../lib/utils')
- Verify imports match the project's configuration
- Default to relative imports - they always work regardless of configuration
生成TypeScript/JavaScript代码时:
- 在生成导入语句之前,检查tsconfig.json中的路径别名(compilerOptions.paths)
- 如果存在路径别名(例如"@/": ["./src/"]),则使用该别名(例如import { x } from '@/lib/utils')
- 如果不存在路径别名或不确定,始终使用相对导入(例如import { x } from '../../../lib/utils')
- 验证导入是否与项目配置匹配
- 默认使用相对导入——无论配置如何,它们始终有效
Available Guides
可用指南
Each guide is a complete, self-contained walkthrough with numbered phases:
- - Full setup from scratch (see: Table of Contents)
guides/new-project.md - - Add Drizzle to running apps (see: Table of Contents)
guides/existing-project.md - - Schema creation and modification (see: Table of Contents)
guides/schema-only.md - - Debug common issues (organized by error type)
guides/troubleshooting.md
I'll automatically detect your context (package manager, framework, deployment target) and select the appropriate guide based on your request.
每个指南都是完整的独立分步教程,包含多个阶段:
- - 从0到1的完整设置流程(查看:目录)
guides/new-project.md - - 向运行中的应用添加Drizzle(查看:目录)
guides/existing-project.md - - 数据库模式的创建与修改(查看:目录)
guides/schema-only.md - - 调试常见问题(按错误类型分类)
guides/troubleshooting.md
我会自动检测你的项目上下文(包管理器、框架、部署目标),并根据你的请求选择合适的指南。
Quick Examples
快速示例
Tell me what you're building - I'll handle the rest:
- "Setup Drizzle for my Next.js blog on Vercel" → Auto-detects Vercel + Next.js → HTTP adapter
- "Add Drizzle to my Express API" → Auto-detects Node.js server → WebSocket adapter
- "Create a users table with auth fields" → Loads schema guide → Generates schema
告诉我你正在构建的项目,我会处理其余部分:
- "为我在Vercel上的Next.js博客设置Drizzle" → 自动检测Vercel + Next.js → 使用HTTP适配器
- "为我的Express API添加Drizzle" → 自动检测Node.js服务器 → 使用WebSocket适配器
- "创建包含认证字段的用户表" → 加载模式指南 → 生成数据库模式
Reference Documentation
参考文档
For deeper technical details (loaded on-demand):
- - HTTP vs WebSocket decision guide
references/adapters.md - - Migration patterns and troubleshooting
references/migrations.md - - Example queries and best practices
references/query-patterns.md
如需更深入的技术细节(按需加载):
- - HTTP与WebSocket适配器选择指南
references/adapters.md - - 迁移模式与故障排查
references/migrations.md - - 查询示例与最佳实践
references/query-patterns.md
Templates & Scripts
模板与脚本
- - Multi-table schema with relations
templates/schema-example.ts - - Configuration examples
templates/drizzle-config.ts - - Automated migration generation
scripts/generate-schema.ts - - Programmatic migration runner
scripts/run-migration.ts
- - 带关联关系的多表模式示例
templates/schema-example.ts - - 配置示例
templates/drizzle-config.ts - - 自动化迁移生成脚本
scripts/generate-schema.ts - - 程序化迁移运行器
scripts/run-migration.ts
Related Skills
相关技能
- neon-auth - Add authentication
- neon-js - Full SDK with auth + PostgREST-style data API
- neon-serverless - Connection setup without ORM
- neon-toolkit - Ephemeral databases for testing
- add-neon-docs - Add Neon best practices to your project (run after setup)
- neon-auth - 添加认证功能
- neon-js - 包含认证及PostgREST风格数据API的完整SDK
- neon-serverless - 无需ORM的连接设置
- neon-toolkit - 用于测试的临时数据库
- add-neon-docs - 向项目中添加Neon最佳实践文档(设置完成后运行)
Workflow
工作流程
I will:
- Detect your project context automatically
- Select and load the appropriate guide
- Follow the guide's phases sequentially
- Track progress using the guide's workflow checklist
- Load reference files only when needed
- Offer to add Neon best practices to your project docs
Ready to get started? Just describe what you're building!
我会:
- 自动检测你的项目上下文
- 选择并加载合适的指南
- 按顺序执行指南的各个阶段
- 使用指南的工作流清单跟踪进度
- 仅在需要时加载参考文件
- 提供向项目文档中添加Neon最佳实践的选项
准备好开始了吗?只需描述你正在构建的项目即可!