Update model

This commit is contained in:
Gregory Trullemans 2024-04-16 11:18:00 +02:00
parent 015b89466e
commit f887477421
2 changed files with 28 additions and 4 deletions

View File

@ -0,0 +1,25 @@
# Generated by Django 4.2 on 2024-04-16 09:17
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("followup", "0067_competitioncategory"),
]
operations = [
migrations.AddField(
model_name="seasoninformation",
name="category",
field=models.ForeignKey(
default=1,
on_delete=django.db.models.deletion.CASCADE,
related_name="season_informations",
to="followup.competitioncategory",
),
preserve_default=False,
),
]

View File

@ -716,10 +716,9 @@ class SeasonInformation(models.Model):
max_digits=3,
decimal_places=1,
)
# category = models.PositiveSmallIntegerField(
# choices=CATEGORY_CHOICES_ARRAY,
# verbose_name="Category",
# )
category = models.ForeignKey(
CompetitionCategory, on_delete=models.CASCADE, related_name="season_informations"
)
club = models.ForeignKey(
Club, null=True, on_delete=models.SET_NULL, related_name="season_informations"
)