https://github.com/raosan/prisma-seeder
CLI tool to easily seed database from a prisma schema file
https://github.com/raosan/prisma-seeder
cli prisma seed seeder
Last synced: about 2 months ago
JSON representation
CLI tool to easily seed database from a prisma schema file
- Host: GitHub
- URL: https://github.com/raosan/prisma-seeder
- Owner: raosan
- License: mit
- Created: 2022-10-20T10:50:44.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-04T19:59:07.000Z (over 2 years ago)
- Last Synced: 2025-01-20T07:20:48.911Z (9 months ago)
- Topics: cli, prisma, seed, seeder
- Language: TypeScript
- Homepage:
- Size: 43.9 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Prisma Seeder
## About
Prisma Seeder is a CLI tool to automatically populate your database with dummy data based on your schema.prisma file.
## Motivation
Prisma has a feature to [seed the database](https://www.prisma.io/docs/guides/database/seed-database) using `npx prisma db seed`. However, you still need to write the script to create entries to your database. With Prisma Seeder, you don't need to write the script.
# Installation
Prisma Seeder is written using TypeScript for Node.js environment. So you can install it as follows```
npm install -g @hyperjumptech/prisma-seeder
```# Usage
```
prisma-seeder --schema --database-url
```
*if there is no `.env` file, you have to create empty `.env` file first, in the directory where you run this command# Development
clone the repo, then install dependencies using```
npm install
```then run
```
./bin/dev --schema --database-url
```
*if there is no `.env` file, you have to create empty `.env` file first, in the directory where you run this command# License
MIT