-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path0010_user_rating_ratinghistory.py
More file actions
34 lines (29 loc) · 1.29 KB
/
0010_user_rating_ratinghistory.py
File metadata and controls
34 lines (29 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Generated by Django 5.2.10 on 2026-02-02 20:22
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('authentication', '0009_alter_user_options_alter_user_id'),
('games', '0033_match_is_tie_match_loser_match_player1_wins_and_more'),
]
operations = [
migrations.AddField(
model_name='user',
name='rating',
field=models.DecimalField(decimal_places=2, default=0.0, max_digits=6),
),
migrations.CreateModel(
name='RatingHistory',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('rating', models.DecimalField(decimal_places=2, max_digits=6)),
('changed_at', models.DateTimeField(auto_now_add=True)),
('match', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='games.match')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='rating_history', to=settings.AUTH_USER_MODEL)),
],
options={
'ordering': ['changed_at'],
},
),
]