feat: payment 서버 데이터를 backend로 마이그레이션하는 스크립트 추가#45
Open
MU-Software wants to merge 3 commits into
Open
Conversation
ffa69bc to
660af08
Compare
earthyoung
reviewed
May 15, 2026
| - auto_username: 위 미매칭 + username 동일 (같은 사람이 다른 email 로 양쪽 가입한 케이스) | ||
| - manual: hardcoded — darjeeling@gmail.com (legacy id 5, 1135) → backend darjeeling@python.or.kr (id 5) | ||
| - shifted: 모두 미매칭 → legacy.id + USER_ID_OFFSET (backend max id 와 충돌 없는 여유 공간) | ||
| """ |
Contributor
There was a problem hiding this comment.
자세하게 주석 남겨주셔서 감사합니다!
혹시 shifted case는 어떤 경우일까요?
Member
Author
There was a problem hiding this comment.
아 운영진이 아닌 일반 티켓 구매 참가자분들입니다ㅎㅎ
earthyoung
reviewed
May 15, 2026
Comment on lines
+294
to
+304
| class Migration(migrations.Migration): | ||
| dependencies = [ | ||
| ("user", "0009_alter_historicaluserext_options_and_more"), | ||
| ("order", "0001_initial"), | ||
| ("product", "0001_initial"), | ||
| ("payment_history", "0001_initial"), | ||
| # allauth — socialaccount/account 테이블 선행 생성 | ||
| ("socialaccount", "0006_alter_socialaccount_extra_data"), | ||
| ("account", "0009_emailaddress_unique_primary_email"), | ||
| ] | ||
| operations = [migrations.RunPython(migrate_data, reverse_code=migrations.RunPython.noop)] |
Contributor
There was a problem hiding this comment.
중간에 실패하는 경우를 대비해서 롤백이나 transaction 관련 설정이 추가되면 좋을 것 같습니다!
earthyoung
reviewed
May 15, 2026
Comment on lines
+4
to
+18
| # 사전 계산값. 새 URL 이 발견되면 여기에 추가하거나 RunPython 결과를 확인할 것. | ||
| LEGACY_IMAGE_META: dict[str, dict] = { | ||
| "https://s3.ap-northeast-2.amazonaws.com/pyconkr-backend-prod-public/public/t-shirt-compressed.png": { | ||
| "file_path": "public/t-shirt-compressed.png", | ||
| "hash": "d131452cf6cd2287e4c302f4f7c17bb5", | ||
| "size": 2069683, | ||
| "mimetype": "image/png", | ||
| }, | ||
| "https://s3.ap-northeast-2.amazonaws.com/pyconkr-backend-prod-public/public/t-shirt-comporessed-2.png": { | ||
| "file_path": "public/t-shirt-comporessed-2.png", | ||
| "hash": "30acab0125661cac1ce75c4a4633042a", | ||
| "size": 2278886, | ||
| "mimetype": "image/png", | ||
| }, | ||
| } |
Contributor
There was a problem hiding this comment.
혹시 가능하다면, 이런 URL을 .env의 환경변수로 빼도 좋을 것 같습니다!
- 형식이 정해져야 한다면 type을 사용해도 좋을 것 같아요!
earthyoung
reviewed
May 15, 2026
Comment on lines
+48
to
+50
| class Migration(migrations.Migration): | ||
| dependencies = [("file", "0001_initial"), ("product", "0001_initial")] | ||
| operations = [ |
Contributor
There was a problem hiding this comment.
operation이 여러 개라서 transaction 처리가 추가되면 좋을 것 같습니다!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
주요 변경 사항