Databases
Fill your local app with realistic test data
Your local database is empty, so you test against production or three rows named “test”.
- What you get
- One command that resets a local database with believable data, including the awkward cases.
- Paste it into
- Your AI tool, in your project
The prompt
Write a seed script so I can reset my local database to a known, realistic state with one command. Read the schema and create data that looks like real use: several users with different roles, a brand-new empty account, an account with enough data that lists paginate, long names, missing optional fields, and records in every status the app supports. Use obviously fake names and example.com emails. Make the script refuse to run against anything but a local or development database, and tell me how it knows. Add the command to the README and tell me the test logins it creates.
Use it
Open your AI tool (Claude Code, Codex or Cursor) in your project folder and paste it in.
More in Databases
Design your tables before you build
The AI invents a new table every time you add a feature, and nothing lines up.
Check that users can’t read each other’s data
Every signed-in user may be able to fetch every row, and the app only hides it in the interface.
Stop changing the database by hand
You edited tables in the dashboard, and now local, preview and production don’t match.
Find out if you could get your data back
You assume the database is backed up and have never tried a restore.