Skip to content

Commit 315185e

Browse files
committed
fix: 닉네임에 unique constraint 제거
1 parent 8081288 commit 315185e

File tree

2 files changed

+24
-10
lines changed

2 files changed

+24
-10
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Generated by Django 5.2 on 2025-07-26 12:46
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
dependencies = [
8+
("user", "0007_historicaluserext_image_userext_image"),
9+
]
10+
11+
operations = [
12+
migrations.RemoveConstraint(
13+
model_name="userext",
14+
name="uq__userext__nickname",
15+
),
16+
migrations.RemoveConstraint(
17+
model_name="userext",
18+
name="uq__userext__nickname-nickname_ko",
19+
),
20+
migrations.RemoveConstraint(
21+
model_name="userext",
22+
name="uq__userext__nickname-nickname_en",
23+
),
24+
]

app/user/models/user.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,6 @@ class UserExt(AbstractUser):
88

99
class Meta:
1010
ordering = ["-date_joined"]
11-
constraints = [
12-
models.UniqueConstraint(
13-
fields=["nickname"],
14-
name="uq__userext__nickname",
15-
condition=models.Q(
16-
nickname__isnull=False,
17-
is_active=True,
18-
),
19-
),
20-
]
2111

2212
def __str__(self):
2313
return f"[User] {self.nickname} <{self.email}>"

0 commit comments

Comments
 (0)