Files
django-channels-more-than-p…/channels_presence/migrations/0002_alter_presence_constraints.py
Andros Fenollosa f60554451d Modernize for Django 3.2+ and Python 3.8+
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-06 11:28:06 +01:00

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'
),
),
]