Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added seeding of DB, now new contributors can run npx prisma db seed and their db will be seeded with sample data to work with #472

Merged
merged 4 commits into from
Nov 6, 2024

Conversation

ShivanshPlays
Copy link
Contributor

@ShivanshPlays ShivanshPlays commented Nov 5, 2024

Seeding Database with Initial Listings

Overview

This seeding file, seeding.ts, is designed to populate the database with initial data. The file will create a dummy seller and six listings, with two listings for each category (Housing, For Sale, and Fooding). Images for each listing will be sourced from the public folder, and linked to the created listings in the database.

This seed data provides users with a quick way to see the platform in action, even if the database is initially empty.

Purpose of the Seeding File

When a user sets up the project for the first time, the database is usually empty, which makes it challenging to explore or test the application's features. Seeding the database with sample listings allows users to:

  • Quickly interact with and test various features of the application.
  • See how data is structured and displayed on different pages.
  • Experience the user flow without needing to manually add initial data.

closes #471

Copy link

vercel bot commented Nov 5, 2024

@ShivanshPlays is attempting to deploy a commit to the Piyush's projects Team on Vercel.

A member of the Team first needs to authorize it.

@ShivanshPlays
Copy link
Contributor Author

Screenshots

This data is generated by seeding my own database after running npx prisma db push

Screen.Recording.2024-11-06.050318.mp4

@swarooppatilx swarooppatilx added gssoc-ext GirlScript Summer of Code Extended 2024 level2 GirlScript Summer of Code Level 2 Issue hacktoberfest-accepted Hacktoberfest labels Nov 6, 2024
@swarooppatilx
Copy link
Owner

Screenshots

This data is generated by seeding my own database after running npx prisma db push
Screen.Recording.2024-11-06.050318.mp4

@Ashish-kharde1 LOL

Copy link
Owner

@swarooppatilx swarooppatilx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@swarooppatilx swarooppatilx merged commit 12ac513 into swarooppatilx:main Nov 6, 2024
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gssoc-ext GirlScript Summer of Code Extended 2024 hacktoberfest-accepted Hacktoberfest level2 GirlScript Summer of Code Level 2 Issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat] Seeding Database with Initial Listings
2 participants