planet scale에서 Database를 dev와 prod로 나누어보자.
prod 브랜치로 promote하면 아래 3가지 좋은 점이 있다.
1, 스키마 직접수정 불가
2. 가용성 증대
3. 자동백업
그리고 브랜치를 만들고 연결해보자.
pscale connect carrot-market indexes
//indexes는 새 브랜치 이름
To update your main branch, you can make schema changes to this branch. Once you're ready, open a deploy request with your changes.
브랜치 바뀌면 데이터도 사라짐. 같은 스키마를 갖고 있지만 data는 다르다.
'클론코딩-캐럿마켓 > 후반' 카테고리의 다른 글
PlanetScale - 22.4 Preview Deployments && 22.5 Limits in Vercel && 22.6 Bye Bye! (0) | 2023.01.30 |
---|---|
Vercel - 22.2~22.3 Vercel Deployment - 버셀 배포 (0) | 2023.01.30 |
21.1~5 React Server Components (0) | 2023.01.28 |
21.0 REACT 18 - Suspense (0) | 2023.01.26 |
Next.js - 20.3 On Demand Revalidation && 20.4 Blocking SSG && 20.5 Fallback && 20.6 Recap && 20.7 Code Challenge (0) | 2023.01.26 |