|
| 1 | +# Generated by Django 5.2.9 on 2025-12-18 10:30 |
| 2 | + |
| 3 | +from django.db import migrations, models |
| 4 | + |
| 5 | + |
| 6 | +class Migration(migrations.Migration): |
| 7 | + |
| 8 | + dependencies = [ |
| 9 | + ("data", "0040_remove_age_and_stratum_from_rbac_permission"), |
| 10 | + ] |
| 11 | + |
| 12 | + operations = [ |
| 13 | + migrations.RemoveConstraint( |
| 14 | + model_name="apitimeseries", |
| 15 | + name="The `APITimeSeries` record should be unique if `force_write` is False", |
| 16 | + ), |
| 17 | + migrations.RemoveConstraint( |
| 18 | + model_name="coreheadline", |
| 19 | + name="The `CoreHeadline` record should be unique if `force_write` is False", |
| 20 | + ), |
| 21 | + migrations.RemoveConstraint( |
| 22 | + model_name="coretimeseries", |
| 23 | + name="The `CoreTimeSeries` record should be unique if `force_write` is False", |
| 24 | + ), |
| 25 | + migrations.AddConstraint( |
| 26 | + model_name="apitimeseries", |
| 27 | + constraint=models.UniqueConstraint( |
| 28 | + condition=models.Q(("force_write", False)), |
| 29 | + fields=( |
| 30 | + "metric", |
| 31 | + "topic", |
| 32 | + "theme", |
| 33 | + "sub_theme", |
| 34 | + "geography", |
| 35 | + "geography_type", |
| 36 | + "geography_code", |
| 37 | + "stratum", |
| 38 | + "age", |
| 39 | + "sex", |
| 40 | + "year", |
| 41 | + "month", |
| 42 | + "epiweek", |
| 43 | + "date", |
| 44 | + "metric_value", |
| 45 | + "in_reporting_delay_period", |
| 46 | + "embargo", |
| 47 | + ), |
| 48 | + name="The `APITimeSeries` record should be unique if `force_write` is False", |
| 49 | + ), |
| 50 | + ), |
| 51 | + migrations.AddConstraint( |
| 52 | + model_name="coreheadline", |
| 53 | + constraint=models.UniqueConstraint( |
| 54 | + condition=models.Q(("force_write", False)), |
| 55 | + fields=( |
| 56 | + "metric", |
| 57 | + "geography", |
| 58 | + "stratum", |
| 59 | + "age", |
| 60 | + "sex", |
| 61 | + "period_start", |
| 62 | + "period_end", |
| 63 | + "metric_value", |
| 64 | + "embargo", |
| 65 | + ), |
| 66 | + name="The `CoreHeadline` record should be unique if `force_write` is False", |
| 67 | + ), |
| 68 | + ), |
| 69 | + migrations.AddConstraint( |
| 70 | + model_name="coretimeseries", |
| 71 | + constraint=models.UniqueConstraint( |
| 72 | + condition=models.Q(("force_write", False)), |
| 73 | + fields=( |
| 74 | + "metric", |
| 75 | + "geography", |
| 76 | + "stratum", |
| 77 | + "age", |
| 78 | + "sex", |
| 79 | + "year", |
| 80 | + "month", |
| 81 | + "epiweek", |
| 82 | + "date", |
| 83 | + "metric_value", |
| 84 | + "in_reporting_delay_period", |
| 85 | + "embargo", |
| 86 | + ), |
| 87 | + name="The `CoreTimeSeries` record should be unique if `force_write` is False", |
| 88 | + ), |
| 89 | + ), |
| 90 | + ] |
0 commit comments