https://github.com/hyperjumptech/prisma-seeder
CLI tool to automatically populate your database with dummy data based on your schema.prisma file
https://github.com/hyperjumptech/prisma-seeder
Last synced: 19 days ago
JSON representation
CLI tool to automatically populate your database with dummy data based on your schema.prisma file
- Host: GitHub
- URL: https://github.com/hyperjumptech/prisma-seeder
- Owner: hyperjumptech
- License: mit
- Created: 2022-11-18T08:00:37.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-11T17:03:41.000Z (about 3 years ago)
- Last Synced: 2026-01-01T09:11:20.748Z (4 months ago)
- Language: TypeScript
- Size: 212 KB
- Stars: 1
- Watchers: 4
- 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
```
# Development
clone the repo, then install dependencies using
```
npm install
```
then run
```
./bin/dev --schema --database-url
```
# Testing
To run the test in your computer:
1. Run `npm run dbsetup` in a terminal tab. Note: You need to install and run docker first.
2. Run `npm run test` in a different terminal tab.
# License
MIT