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

Refactor database seed procedure #125

Merged
merged 1 commit into from
Feb 20, 2024
Merged

Conversation

wcalderipe
Copy link
Collaborator

This PR introduces a seeder service that automatically discovers seeds loaded as providers in the current module container. It also transitions seed files from plain scripts to the NestJS architecture, allowing us to use dependency injection in seeders. This crucial detail enables us to utilize repositories and domain types for seeding the database instead of relying on the Prisma client and models.

The issue with Prisma models is that they can sometimes differ significantly from the domain types, leading to confusion.

@wcalderipe wcalderipe self-assigned this Feb 20, 2024
@wcalderipe wcalderipe changed the title Seeder service with auto discovery Refactor database seed procedure Feb 20, 2024
@wcalderipe wcalderipe merged commit 91dbba6 into main Feb 20, 2024
1 check passed
@wcalderipe wcalderipe deleted the chore/seed-auto-discovery branch March 5, 2024 14:17
mattschoch pushed a commit that referenced this pull request Jun 19, 2024
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.

1 participant