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/switch database from postgreSQL to MongoDB #105

Merged
merged 27 commits into from
Feb 20, 2022

Conversation

holmir97
Copy link
Member

@holmir97 holmir97 commented Feb 20, 2022

✅ PR check list

  • commit message가 적절한지 확인해주세요.
  • 마지막으로 Coding Convention을 준수했는지 확인해주세요.
  • 적절한 branch로 요청했는지 확인해주세요.
  • Assignees, Label을 붙여주세요.
  • 가능한 이슈를 Link 해주세요.
  • PR이 승인된 경우 해당 브랜치는 삭제 부탁드립니다.
    image

🌈 PR 요약

postgreSQL 과 시퀄라이즈 제거
mongoDB, mongoCompass 설치

📌 변경 사항

테스팅을 위해 라우팅 부분을 주석하였습니다.

추가 설치 모듈
npm install mongoose
npm install mongoose-validator
npm install @types/mongoose

Linked Issue

close #102

@holmir97 holmir97 added 🌈 refactor 코드 리팩토링 1️⃣ priority: high 우선순위 높음 labels Feb 20, 2022
@holmir97 holmir97 self-assigned this Feb 20, 2022
Copy link
Contributor

@seohyun-106 seohyun-106 left a comment

Choose a reason for hiding this comment

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

시퀄라이즈 잘가고 .. 성용이 고생했고 .. 고맙고 .. 응 ...

Copy link
Member

@geeneve geeneve left a comment

Choose a reason for hiding this comment

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

주말간 굉장히 고생하셨슴돠
코드에 질문 2개 달았어요 👍

export interface IBook {
_id: mongoose.Schema.Types.ObjectId;
isbn: Number;
isbn_sub: Number;
Copy link
Member

Choose a reason for hiding this comment

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

  1. not null이 아닌 칼럼에 ? 붙인다고 했던 것 같음!! (여기 아닌가..)
  2. O2 코드랑 다른게 여기는 대문자 Number고 O2는 소문자 number인데 차이가 있는건지 궁금해요

Copy link
Member Author

Choose a reason for hiding this comment

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

  1. 스키마에 사용되는 인터페이스이기 때문에 여기선 ? 를 사용하지 않습니다! 추후에 DTO를 선언할때는 필요해요!
  2. 몽고디비는 Number 대문자 데이터 형식을 사용하기 때문에 스키마 선언시에는 Number로, 그 외에 DTO나 interface에서는 타입스크립트에 맞춰 number를 사용하는게 맞습니다, 이 코드에서는 제가 전부 Number를 쓰는 실수를 범했네요! 수정하겠습니다

required: false,
},
// 이메일 인증번호
emailCode: {
Copy link
Member

Choose a reason for hiding this comment

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

emailCode -> email_code

Copy link
Contributor

Choose a reason for hiding this comment

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

진짜 곰곰하다 동근아 리스펙 ,,

@holmir97 holmir97 changed the base branch from develop to develop-mongo February 20, 2022 14:21
@holmir97 holmir97 merged commit 83c34c1 into develop-mongo Feb 20, 2022
@holmir97 holmir97 deleted the refactor/switch-database branch February 20, 2022 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1️⃣ priority: high 우선순위 높음 🌈 refactor 코드 리팩토링
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[refactor] switch database from postgreSQL to mongoDB
3 participants