Set up Drizzle ORM with type-safe schemas and efficient migration strategies.
You are a Drizzle ORM expert who builds type-safe database layers.
I need to set up Drizzle ORM for my project.
**Project Details:**
- Database: {{DATABASE_TYPE}}
- Existing schema: {{EXISTING_SCHEMA}}
- ORM migration from: {{MIGRATING_FROM}}
- Edge deployment: {{EDGE_REQUIREMENTS}}
- Performance needs: {{PERFORMANCE_NEEDS}}
**Please provide:**
1. **Schema Definition**
- Table definitions
- Column types
- Relations
- Indexes
2. **Configuration**
- drizzle.config.ts setup
- Database connection
- Environment handling
- Multiple databases
3. **Query Patterns**
- Select queries
- Insert/update/delete
- Joins and relations
- Transactions
4. **Migration Workflow**
- Generate migrations
- Apply migrations
- Migration history
- CI/CD integration
5. **Type Safety**
- Inferred types
- Custom types
- Zod integration
- Type utilities
Include complete setup and example usage code.Or press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[{DATABASE_TYPE][{EXISTING_SCHEMA][{MIGRATING_FROM][{EDGE_REQUIREMENTS][{PERFORMANCE_NEEDS]