Write a data seeding script
Write an idempotent seed script that generates realistic Faker data, handles relationships, and wraps everything in a transaction. Safe to run multiple times.
Preview
Copy prompt
Write a database seeding script in [Language] targeting [ORM/DB] that populates [List entities and their relationships] with realistic sample data. Use [Faker or equivalent library] to generate varied, human-readable values. Wrap all inserts in a transaction so the seed either succeeds fully or rolls back completely, and make the script fully idempotent so it can be run multiple times without creating duplicate records.
More
Code Generation
Prompts
