fix migration

stream
Laurent 2 years ago
parent 5ebd090507
commit b1db98c238
  1. 19
      tournaments/migrations/0013_teamstate_team_registration.py
  2. 2
      tournaments/models.py

@ -0,0 +1,19 @@
# Generated by Django 4.2.11 on 2024-03-08 13:38
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('tournaments', '0012_alter_teamstate_score'),
]
operations = [
migrations.AddField(
model_name='teamstate',
name='team_registration',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='tournaments.match'),
),
]

@ -381,7 +381,7 @@ class TeamState(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
match = models.ForeignKey(Match, on_delete=models.CASCADE, related_name="team_states") match = models.ForeignKey(Match, on_delete=models.CASCADE, related_name="team_states")
player_registrations = models.ManyToManyField(PlayerRegistration, blank=True) player_registrations = models.ManyToManyField(PlayerRegistration, blank=True)
team_registration = models.ForeignKey(Match, on_delete=models.CASCADE) team_registration = models.ForeignKey(Match, on_delete=models.CASCADE, null=True, blank=True)
score = models.CharField(max_length=50, null=True, blank=True) score = models.CharField(max_length=50, null=True, blank=True)
walk_out = models.IntegerField(null=True, blank=True) #id, int of the walked_out team walk_out = models.IntegerField(null=True, blank=True) #id, int of the walked_out team
lucky_loser = models.BooleanField() lucky_loser = models.BooleanField()

Loading…
Cancel
Save