5381aba922
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.
24 lines
693 B
Python
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",
|
|
),
|
|
),
|
|
]
|