-
Database
Add foreign keys and decide delete behavior
Enforces relationships at the database level and makes deletes cascade, restrict, or null out deliberately.
Free Prompt
What This Does / How This Helps
Turns implied relationships into enforced ones, with a deliberate answer for what happens to children when a parent gets deleted. Without foreign keys, databases fill with orphans: posts by deleted users, line items for orders that don't exist, memberships pointing at teams that were removed months ago. The app then crashes or renders garbage when it follows a reference into nothing, usually on the page a user cares about most. The delete-behavior decision per relationship is the real work here, and the prompt forces it: cascade, restrict, or null out, each with a reason, so 'what happens when a user deletes their account' has an actual answer.
Want to skip doing this by hand?
Fortivibe audits your app for all of the areas these prompts cover (and more).