Skip to content

Commit

Permalink
minor: update TenantUserCustomField unique_together
Browse files Browse the repository at this point in the history
  • Loading branch information
narasux committed Sep 14, 2023
1 parent 047c9aa commit a787f87
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 3.2.20 on 2023-09-14 01:58
# Generated by Django 3.2.20 on 2023-09-14 02:13

from django.db import migrations, models

Expand All @@ -10,10 +10,6 @@ class Migration(migrations.Migration):
]

operations = [
migrations.RemoveField(
model_name='tenantusercustomfield',
name='order',
),
migrations.AlterField(
model_name='tenantusercustomfield',
name='data_type',
Expand All @@ -29,4 +25,12 @@ class Migration(migrations.Migration):
name='display_name',
field=models.CharField(max_length=128, unique=True, verbose_name='展示用名称'),
),
migrations.AlterUniqueTogether(
name='tenantusercustomfield',
unique_together={('display_name', 'tenant'), ('name', 'tenant')},
),
migrations.RemoveField(
model_name='tenantusercustomfield',
name='order',
),
]
4 changes: 2 additions & 2 deletions src/bk-user/bkuser/apps/tenant/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ class TenantUserCustomField(TimestampedModel):

class Meta:
unique_together = [
("tenant", "name"),
("tenant", "display_name"),
("name", "tenant"),
("display_name", "tenant"),
]


Expand Down

0 comments on commit a787f87

Please sign in to comment.