-
Notifications
You must be signed in to change notification settings - Fork 0
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
✨ [Feature] database seeding #96
Conversation
- auth 시딩파일 설정 - `yarn seed` 으로 시딩 - `yarn seed:reset` 으로 시딩할 디비 리셋
- user, friend factory 추가 - typeorm-extension 안쓰는 방법으로 refactoring
- message seeding 파일 추가 - .env.sample 에 Test db 추가해서 관리
- accept: true 일 때만 last_message_time 생성되도록 변경
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오나전 지대 짱입니닷.... 감사합니다..ㅎㅎ faker....신기하네요 고생하셨습니다~~!!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
감사합니다 선생님..
@@ -0,0 +1,41 @@ | |||
//import dotenv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이상한 주석이 있어요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
Auth
,User
,Friendship
,Message
seeding.Describe your changes
faker
를 이용한 랜덤 seed data 생성.env
파일에TEST_DB_NAME
을 추가해서 테스트용 database 관리DB_NAME
과 똑같이 설정하시는 게 편할 수 있습니다.yarn seed [number]
로 시드 데이터 생성auth
테이블의 row 가 생성되고 확률에 따라user
,friendship
,message
가 생성됩니다.yarn seed:reset
하시면.env
에 설정하신TEST_DB_NAME
이dropdb
후createdb
됩니다.Issue number and link