seed (Prisma CLI v7)
Seed your database with test or initial data using custom scripts
The prisma db seed command seeds your database with initial data.
prisma db seed [options]Options
Section titled “Options”| Option | Description |
|---|---|
-h, --help |
Display help message |
--config |
Custom path to your Prisma config file |
-- |
Pass custom arguments to the seed file |
The -- delimiter allows you to pass custom arguments to your seed script (available in version 4.15.0+).
Examples
Section titled “Examples”Run the seed script
Section titled “Run the seed script”bunx prisma db seedpnpm prisma db seedyarn prisma db seednpx prisma db seedPass custom arguments
Section titled “Pass custom arguments”bunx prisma db seed -- --arg1 value1 --arg2 value2pnpm prisma db seed -- --arg1 value1 --arg2 value2yarn prisma db seed -- --arg1 value1 --arg2 value2npx prisma db seed -- --arg1 value1 --arg2 value2