Prisma CLI & ConfigurationCLI Command Reference
prisma1 seed
$ prisma1 seed
Seeds the service with data.
This command expects that the seed
property in prisma.yml
is specified.
Usage
prisma1 seed [flags]
Flags
-e, --env-file ENV-FILE Path to .env file to inject env vars
-r, --reset Reset the service before seeding
Examples
If you specified the seed
property in your prisma.yml
, you can run the prisma1 seed
command. For example:
JavaScript
TypeScript
Go
seed: run: node ./data/seed.js
Copy
All sample projects in the prisma-examples
repository are based on this seeding mechanism.
Seed service with initial data
prisma1 seed
Seed service with initial data after deleting all of the service's data first
prisma1 seed --reset