# Database Scripts ## Seed Test Questions The `seed-test-questions.ts` script creates test data for local development: ### Usage: #### Option 1: Use with real user handles (recommended) ```bash # First, login as real users through the web app, then: pnpm run db:seed your-handle.bsky.social another-user.bsky.social # Example: pnpm run db:seed alice.bsky.social bob.bsky.social charlie.bsky.social ``` #### Option 2: Use default test users (for testing only) ```bash # Creates fake test users that you can't actually login as pnpm run db:seed ``` ### What it creates: - **Questions between real users** (if handles provided) or **3 fake test users** (fallback) - **10 diverse programming-related questions** distributed between users - **Mix of regular and anonymous questions** ### Features: - ✅ **Works with real user accounts** - provide handles of users who have logged in - ✅ **Safe fallback** - creates fake test users if no handles provided - ✅ **Smart user detection** - checks if provided handles exist in database - ✅ **Round-robin question distribution** - spreads questions evenly between users - ✅ **Safe to run multiple times** (uses `onConflictDoNothing()` for users) - ✅ **Clear progress logging** with emojis and status updates - ✅ **Provides summary statistics** at the end ### Example Questions Include: - "What's your favorite programming language and why?" - "How do you stay motivated when working on long-term projects?" - "What's the most interesting bug you've ever encountered?" - "If you could give advice to your past self when you started coding, what would it be?" - "What's your go-to method for debugging complex issues?" - And more... ### Requirements: - **For real users**: Users must have logged in through the web app at least once - **Minimum 2 users** needed to create questions between them ### Note: These are local test questions only - they are **not synced to the AT Protocol network**.