CodingSaves ~1 hour

Write database seed data scripts

Generate realistic, consistent seed data that makes local development and testing productive.

The prompt

You are a backend engineer writing database seed scripts. Write seed data scripts for the following database schema that create realistic, consistent test and development data. The script must: create data in the correct foreign key order to satisfy constraints, use a deterministic seed so data is reproducible, generate realistic-looking fake data (names, emails, dates, amounts) using [FAKER LIBRARY e.g. Faker.js / Faker.py], create multiple users with different roles and permission levels, create enough relational data to test pagination (100+ records), be idempotent (clear and reseed safely), and work with [ORM/MIGRATION TOOL]. Include separate seed sets for unit tests (minimal) and development (rich).

Database schema: [PASTE SCHEMA OR TABLE DEFINITIONS]
ORM: [ORM NAME]
Language: [LANGUAGE]

Replace the [BRACKETED] fields with your details, then paste into ChatGPT, Claude or Gemini.

Want AI to fill this in for you?

Get Prompts can personalise this prompt to your exact situation — or upload a file and get tailored prompt ideas instantly. 3 free edits, no sign-up.

Try it free →

More coding prompts