Group
  • Database

    Guard seed and fixture data out of production

    Adds environment guards so test users, demo records, and seed scripts can never run or leak into production.

    • Improve quality
    • Plan & validate
    • Beginner
    • General

Free Prompt

Make it impossible for seed or fixture data to reach production. Find every seed script, fixture loader, demo-data generator, and test-account creation path in the codebase. Guard each one: check the environment at the top of every seed/fixture path and hard-exit unless it's explicitly development or test; remove any seed-on-startup behavior that runs unconditionally; audit the production database for fixture-shaped data that's already there ([email protected] accounts, demo products, lorem ipsum content) and write a cleanup script for what you find; and make sure no route or admin endpoint can trigger a seed. Test accounts that must exist in production for support purposes get flagged for review, not silently kept. Don't rely on convention like 'we just don't run it in prod'. The guard belongs in code. Don't delete production data without reporting it first; list what you found and let me confirm before the cleanup script runs anywhere real. Deliver: the environment guards added per script, the audit of fixture-shaped data in production, the cleanup script, and verification: attempt to run the seed with production environment variables and confirm it refuses.

What This Does / How This Helps

Adds hard guards so seed scripts and fixture data physically cannot run against production, and finds the test data that already leaked in. This failure is common and embarrassing: a launch with demo products in the store, test users who can log in, or a seed script that wipes production because someone ran it with the wrong env. It happens because nothing in the code stops it. The audit of existing data matters as much as the guards. Most apps that grew up fast have at least one demo record sitting in prod.

Want to skip doing this by hand?

Fortivibe audits your app for all of the areas these prompts cover (and more).

See What We Check

Related Prompts