feat: complete realtime challenge matchmaking
This commit is contained in:
+36
@@ -0,0 +1,36 @@
|
||||
# Generated by Django 4.2.23 on 2026-08-08 18:41
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('contest', '0003_mathgameattempt_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveIndex(
|
||||
model_name='realtimematch',
|
||||
name='matchmaking_lookup_idx',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='realtimematch',
|
||||
name='challenge_code',
|
||||
field=models.CharField(blank=True, max_length=8, null=True, unique=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='realtimematch',
|
||||
name='expires_at',
|
||||
field=models.DateTimeField(blank=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='realtimematch',
|
||||
name='match_type',
|
||||
field=models.CharField(choices=[('random', '随机匹配'), ('challenge', '联机码约战')], default='random', max_length=16),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name='realtimematch',
|
||||
index=models.Index(fields=['contest', 'match_type', 'status', 'player_one_rating', 'created_at'], name='matchmaking_lookup_idx'),
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user