🚀Announcing Flightcontrol - Easily Deploy Blitz.js and Next.js to AWS 🚀
Back to Documentation Menu

blitz db

Topics

Jump to a Topic
Caution

This command is now deprecated in favor of using the blitz prisma command. The blitz db seed command still works until Prisma finishes adding their native seeding functionatily.

blitz db seed

This will run a script provided with the optional file flag. If omitted, it defaults to db/seeds. This is often used to quickly set up the development environment. For examples check seeds docs

Options

ArgumentShortDescriptionDefault
--file-fPath to the seeds file, relative to the project root folder. Examples: db/seeds, db/seeds.ts, db/seeds/index.ts, db/my-seedsdb/seeds
--env-eSet app environment name. Read more.None

Examples

blitz db seed
blitz db seed -f=db/path-to-seeds-script

Idea for improving this page? Edit it on GitHub.