wowprompt

Seed data and test fixtures generator from a database schema

Generates realistic seed data and test fixtures from a database schema, with valid foreign keys, edge-case rows and no real personal data, plus the script that loads it. Use it to fill a local or staging database, demo an app, or give tests a known starting state.

A table of planned rows per table with the edge cases each covers, fixture files in the requested format and a loading script that inserts tables in dependency order
The output this prompt produced, unedited.

The prompt

Fill in these first

  • Schema: [paste CREATE TABLE statements, an ORM model file or a table list with columns and types]
  • Database and tooling: [e.g. PostgreSQL with Prisma, MySQL with Laravel seeders, SQLite with pytest]
  • Output format: [SQL inserts, JSON fixtures, CSV, or seeder code]
  • Rows per table: [e.g. 10 users, 50 orders, 200 order lines]
  • Locale for names, addresses and phone numbers: [e.g. India, UK, mixed]
  • Edge cases tests need: [e.g. user with no orders, cancelled order, very long name, zero-price item]

Task

Create seed data that respects every constraint in the schema and covers the edge cases, then write the code to load it.

Data rules

  1. Insert parent tables before child tables, and every foreign key points to a row that exists.
  2. Respect unique, not null, check constraints, enum values and column lengths.
  3. Dates are consistent: an order is never shipped before it was placed.
  4. Totals match their lines where the schema stores both.
  5. Each edge case appears at least once and is labelled in a comment.
  6. Fixed IDs or a fixed random seed so tests get the same data on every run.

Output format

  1. | Table | Rows | Edge cases covered |
  2. The data in the format requested, one block per table.
  3. The loading script, with a reset step that clears tables in reverse order.
  4. Assumptions about any column whose meaning was unclear.

Rules

  • No real people, real email domains or real phone numbers; use example.com addresses and clearly fake numbers.
  • Never include real passwords; store a placeholder hash and note it.
  • Do not change the schema; list suggested schema fixes separately.
seed datatest fixturessample data generatordatabase seedingmock datatest data

How to run this

Copy the prompt and paste it into Gemini, then set the aspect ratio to 3:4. No reference photo is needed for this one.

The prompt is written in Markdown with each part under its own heading, which is what the copy action hands over. Change one section at a time, keeping the rest intact, so you can tell which change did the work.

Related prompts

All productivity