Database
Database configuration using PostgreSQL and Drizzle ORM in ShipKit
Database
ShipKit uses PostgreSQL as the database and Drizzle ORM for type-safe database operations.
Features
- Type-safe queries
- Automatic migrations
- Schema validation
- Connection pooling
- Prepared statements
- SQL security
Configuration
Add these environment variables to configure your database:
# Required
DATABASE_URL=postgresql://user:password@host:port/database
# Optional - For database naming prefix
DB_PREFIX=your_prefix
Database Setup
- Create a PostgreSQL database
- Set up the connection URL in your environment
- Run migrations:
pnpm db:migrate
- Generate types:
pnpm db:generate
Hosting Options
- Neon - Serverless Postgres (Recommended)
- Supabase - Open source Firebase alternative
- Railway - Infrastructure platform
- Self-hosted PostgreSQL