Skip to content

Commit

Permalink
Remove unique constraint on chat room names
Browse files Browse the repository at this point in the history
Fixes #763

I think the actual constraint we would want is unique names per server,
but this model doesn't have that info. As it is this caused problems
last year when puzzles had titles identical to previous year puzzles.
  • Loading branch information
rgossiaux committed Dec 15, 2024
1 parent c2ad875 commit 8d63300
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 4.1.13 on 2024-12-15 08:23

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("chat", "0009_alter_chatrole_id_alter_chatroom_id"),
]

operations = [
migrations.RemoveConstraint(
model_name="chatroom",
name="unique_room_name_per_service",
),
]
7 changes: 0 additions & 7 deletions chat/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,6 @@ class ChatRoom(models.Model):
audio_channel_url = models.URLField(null=True, blank=True)
audio_channel_id = models.CharField(max_length=255, null=True, blank=True)

class Meta:
constraints = [
models.UniqueConstraint(
name="unique_room_name_per_service", fields=["service", "name"]
),
]

def __str__(self):
return self.name

Expand Down

0 comments on commit 8d63300

Please sign in to comment.