Skip to content

Commit d9d3dd6

Browse files
authored
[hotfix] Kakao 사용자 기존 이메일이 Null인 데이터에 대한 마이그레이션 이슈 해결 (#352)
1 parent 2487593 commit d9d3dd6

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

backend/src/main/java/com/back/domain/user/entity/User.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class User extends BaseEntity {
4747
)
4848
private Long id;
4949

50-
@Column(nullable = false, length = 100, unique = true)
50+
@Column(length = 100)
5151
private String email;
5252

5353
@Column(nullable = false, name = "full_name", length = 30)
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
CREATE UNIQUE INDEX IF NOT EXISTS ux_users_email
2-
ON users (email);
3-
4-
ALTER TABLE users
5-
ALTER COLUMN email SET NOT NULL;
1+
CREATE UNIQUE INDEX IF NOT EXISTS ux_users_email_not_null
2+
ON users (email)
3+
WHERE email IS NOT NULL;

0 commit comments

Comments
 (0)