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

Generate Seed Data #161

Merged
merged 4 commits into from
Feb 20, 2022
Merged

Generate Seed Data #161

merged 4 commits into from
Feb 20, 2022

Conversation

LenaNguyen
Copy link
Member

@LenaNguyen LenaNguyen commented Feb 19, 2022

Ticket link

Closes #92

Steps to test

Ask me for the UIDs of the test users to add to your .env.
run docker exec -it sistering_backend bash -c "npx prisma db seed" to run just the seed script or docker exec -it sistering_backend bash -c "npx prisma migrate reset" to replace data in your current db with seed data.

Try logging in as a test user. The password for all test users is Test123.

What should reviewers focus on?

  • Check that users, branches, skills, shifts, postings, etc. are generated properly.

Checklist

  • My PR name is descriptive and in imperative tense
  • My commit messages are descriptive and in imperative tense. My commits are atomic and trivial commits are squashed or fixup'd into non-trivial commits
  • I have run the appropriate linter(s)
  • I have requested a review from the PL, as well as other devs who have background knowledge on this PR or who will be building on top of this PR

@LenaNguyen LenaNguyen marked this pull request as ready for review February 20, 2022 00:15
@LenaNguyen LenaNguyen self-assigned this Feb 20, 2022
backend/prisma/seed.ts Outdated Show resolved Hide resolved
MatoPlus
MatoPlus previously approved these changes Feb 20, 2022
Copy link
Member

@MatoPlus MatoPlus left a comment

Choose a reason for hiding this comment

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

Other than the issue pointed out earlier, this is good!

sherryhli
sherryhli previously approved these changes Feb 20, 2022
Copy link
Member

@sherryhli sherryhli left a comment

Choose a reason for hiding this comment

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

Didn't test yet but LGTM! 🚢

What do we think about adding a prisma db clear script as well to delete all data (but not drop tables)? prisma/docs#451 (comment)

backend/prisma/seed.ts Outdated Show resolved Hide resolved
@LenaNguyen LenaNguyen dismissed stale reviews from sherryhli and MatoPlus via 9a3661c February 20, 2022 21:35
@LenaNguyen
Copy link
Member Author

Didn't test yet but LGTM! 🚢

What do we think about adding a prisma db clear script as well to delete all data (but not drop tables)? prisma/docs#451 (comment)

seems pretty low priority. Is the advantage just making the data reset faster since you don't have to wait for migrations to run? Bc prisma migrate reset clears all the data and reruns all migrations.

@LenaNguyen LenaNguyen merged commit 42de004 into main Feb 20, 2022
@LenaNguyen LenaNguyen deleted the lena/seed-data branch February 20, 2022 21:42
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.

Make seed data
3 participants