mirror of
https://github.com/tanrax/django-channels-more-than-present
synced 2026-01-09 06:43:39 +01:00
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
27 lines
675 B
Python
27 lines
675 B
Python
# Generated migration to replace unique_together with constraints
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('channels_presence', '0001_initial'),
|
|
]
|
|
|
|
operations = [
|
|
# Remove old unique_together
|
|
migrations.AlterUniqueTogether(
|
|
name='presence',
|
|
unique_together=set(),
|
|
),
|
|
# Add new constraint
|
|
migrations.AddConstraint(
|
|
model_name='presence',
|
|
constraint=models.UniqueConstraint(
|
|
fields=['room', 'channel_name'],
|
|
name='unique_presence_room_channel'
|
|
),
|
|
),
|
|
]
|