ernestophone.ens.fr/propositions/migrations/0005_remove_nb_yes_no_fields.py
Martin Pépin 5381aba922
Remove the nb_{yes,no} fields
These fields duplicate information that is already present in the Answer
table. I guess they exist(ed) as an optimisation to avoid recomputing
the number of positive and negative answers per proposition each time
the list page is loaded. Given the small number of propositions we have
in practice and the extra housekeeping required to keep these fields up
to date, I consider simplicity matters more here.
2020-01-05 16:34:10 +01:00

24 lines
693 B
Python

# Generated by Django 2.2.9 on 2020-01-05 15:26
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("propositions", "0004_prop_renaming_and_cleaning"),
]
operations = [
migrations.RemoveField(model_name="proposition", name="nb_no",),
migrations.RemoveField(model_name="proposition", name="nb_yes",),
migrations.AlterField(
model_name="answer",
name="proposition",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="propositions.Proposition",
),
),
]