Cursor Prompt: Design a Database Schema
When to Use This Prompt
Use this early in any project that needs a database. Good schema design prevents painful migrations later.
The Prompt
Design a complete database schema for a [YOUR APP TYPE]: 1. Create all necessary tables with appropriate column types 2. Add proper foreign key relationships between tables 3. Include indexes on frequently queried columns 4. Add created_at and updated_at timestamps on all tables 5. Generate SQL migration files 6. Create TypeScript type definitions matching the schema 7. Add seed data for development Use PostgreSQL syntax. Include comments explaining design decisions. Tables needed: [LIST YOUR MAIN ENTITIES]
What to Customize
Replace [YOUR APP TYPE] with your application type and list the specific entities/tables you need.
Expected Output
SQL migration files, TypeScript types, and seed data. Usually 3-5 files covering the complete data model.