Skip to content

Davidasix/seed database#20

Merged
DavidASix merged 4 commits into
mainfrom
davidasix/seed-database
Jul 27, 2025
Merged

Davidasix/seed database#20
DavidASix merged 4 commits into
mainfrom
davidasix/seed-database

Conversation

@DavidASix

Copy link
Copy Markdown
Owner

This PR adds a script which will seed the local database with some basic data to test with.

@DavidASix
DavidASix requested a review from Copilot July 27, 2025 05:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a comprehensive database seeding script to populate the local database with test data. The script creates sample data across multiple tables including users, businesses, reviews, subscriptions, and related entities.

  • Adds seeding functionality for all major database tables with realistic test data
  • Integrates seeding into the existing database workflow via npm scripts
  • Provides both populated tables (users, businesses, reviews) and placeholder seeders for empty tables

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/scripts/seed/seed.ts Main orchestration script that runs all seeding modules sequentially
src/scripts/seed/user.ts Seeds user table with sample user data including Stripe customer ID
src/scripts/seed/businesses.ts Seeds businesses table with a sample business (UniClaw arcade)
src/scripts/seed/reviews.ts Seeds reviews table with 10 sample Google reviews for the business
src/scripts/seed/subscription_payments.ts Seeds subscription payments with sample billing data
src/scripts/seed/business_stats.ts Seeds business statistics with review count and score
src/scripts/seed/events.ts Seeds events table with sample update events
src/scripts/seed/api_keys.ts Seeds API keys table with a sample key
src/scripts/seed/session.ts Placeholder seeder for session table (no data)
src/scripts/seed/verificationToken.ts Placeholder seeder for verification token table (no data)
src/scripts/seed/authenticator.ts Placeholder seeder for authenticator table (no data)
src/scripts/seed/account.ts Placeholder seeder for account table (no data)
package.json Adds db:seed script and integrates seeding into db:fresh workflow

Comment thread src/scripts/seed/subscription_payments.ts
Comment thread src/scripts/seed/subscription_payments.ts
Repository owner deleted a comment from Copilot AI Jul 27, 2025
@DavidASix
DavidASix merged commit dd72117 into main Jul 27, 2025
2 checks passed
@DavidASix
DavidASix deleted the davidasix/seed-database branch July 27, 2025 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants