Skip to content

Commit 6ef0b13

Browse files
committed
fix: user 마이그레이션 시 username을 nickname으로 넣도록 수정
1 parent 65196d9 commit 6ef0b13

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

app/shop/order/migrations/0002_migrate_from_legacy.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,10 @@ def _copy_shifted_users(target_cur, legacy_cur, user_id_map: dict[int, tuple[int
137137
""",
138138
[shifted_ids],
139139
)
140-
# nickname* / image_id 는 legacy 에 없으므로 None.
140+
# legacy 에는 nickname 컬럼이 없음 — username 으로 ko/en 기본값 채우기 (master nickname 은 None).
141+
# image_id 도 legacy 부재.
141142
rows = [
142-
(user_id_map[lid][0], pw, llg, sup, uname, fn, ln, em, stf, act, dj, None, None, None, None, uniq)
143+
(user_id_map[lid][0], pw, llg, sup, uname, fn, ln, em, stf, act, dj, None, uname, uname, None, uniq)
143144
for lid, pw, llg, sup, uname, fn, ln, em, stf, act, dj, uniq in legacy_cur.fetchall()
144145
]
145146
target_cur.executemany(

0 commit comments

Comments
 (0)