Skip to content

Commit 1130304

Browse files
committed
car class added to the uniq together constraint or car
1 parent 2ed009d commit 1130304

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Generated by Django 5.1b1 on 2024-11-12 15:05
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
("telemetry", "0032_alter_car_unique_together"),
10+
]
11+
12+
operations = [
13+
migrations.AlterUniqueTogether(
14+
name="car",
15+
unique_together={("game", "name", "car_class")},
16+
),
17+
]

telemetry/models/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class Meta:
4040
ordering = [
4141
"name",
4242
]
43-
unique_together = ("game", "name")
43+
unique_together = ("game", "name", "car_class")
4444

4545
name = models.CharField(max_length=200)
4646

0 commit comments

Comments
 (0)