Back to Browse

How I use database seed scripts for local development

1.4K views
Jul 3, 2024
10:49

Discover an essential and underrated technique for populating your local development environment with usable data: creating a seed script for your database. This video offers a walkthrough of a real-life seed script using Prisma in a monorepo setup. Learn about important checks to avoid running the script in production, utilizing libraries like Faker for generating fake data, and combining tools like Prisma and Lodash to efficiently create bulk records. Faker: https://fakerjs.dev Prisma: https://www.prisma.io Sign up for my product 👉 https://www.usebaton.com 00:00 Intro 00:58 Setting Up the Seed Script 01:11 Ensuring Safety Checks 02:10 Truncating and Writing Data 03:18 Using Faker for Fake Data 06:22 Writing More Data 09:39 Finalizing the Seed Script 09:58 Conclusion and Next Steps

Download

1 formats

Video Formats

360pmp419.1 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

How I use database seed scripts for local development | NatokHD