Skip to content

Commit

Permalink
Add 5 columns to districts
Browse files Browse the repository at this point in the history
  • Loading branch information
szabozoltan69 committed Nov 28, 2024
1 parent 2a3cb5d commit c6cfd5e
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Generated by Django 4.2.16 on 2024-11-28 09:46

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("api", "0215_alter_generaldocument_document_and_more"),
]

operations = [
migrations.AddField(
model_name="district",
name="emma_id",
field=models.CharField(blank=True, help_text="Meteoalarm EMMA_ID", max_length=10, null=True, verbose_name="emma_id"),
),
migrations.AddField(
model_name="district",
name="fips_code",
field=models.PositiveIntegerField(blank=True, help_text="USA FIPS Code", null=True, verbose_name="fips_code"),
),
migrations.AddField(
model_name="district",
name="nuts1",
field=models.CharField(
blank=True,
help_text="Nomenclature of Territorial Units for Statistics 1",
max_length=3,
null=True,
verbose_name="nuts1",
),
),
migrations.AddField(
model_name="district",
name="nuts2",
field=models.CharField(
blank=True,
help_text="Nomenclature of Territorial Units for Statistics 2",
max_length=4,
null=True,
verbose_name="nuts2",
),
),
migrations.AddField(
model_name="district",
name="nuts3",
field=models.CharField(
blank=True,
help_text="Nomenclature of Territorial Units for Statistics 3",
max_length=5,
null=True,
verbose_name="nuts3",
),
),
]
23 changes: 23 additions & 0 deletions api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,29 @@ class District(models.Model):
wb_year = models.CharField(
verbose_name=_("WB year"), max_length=4, null=True, blank=True, help_text=_("population data year from WB API")
)
nuts1 = models.CharField(
verbose_name=_("nuts1"),
max_length=3,
blank=True,
null=True,
help_text=_("Nomenclature of Territorial Units for Statistics 1"),
)
nuts2 = models.CharField(
verbose_name=_("nuts2"),
max_length=4,
blank=True,
null=True,
help_text=_("Nomenclature of Territorial Units for Statistics 2"),
)
nuts3 = models.CharField(
verbose_name=_("nuts3"),
max_length=5,
blank=True,
null=True,
help_text=_("Nomenclature of Territorial Units for Statistics 3"),
)
emma_id = models.CharField(verbose_name=_("emma_id"), max_length=10, blank=True, null=True, help_text=_("Meteoalarm EMMA_ID"))
fips_code = models.PositiveIntegerField(verbose_name=_("fips_code"), blank=True, null=True, help_text=_("USA FIPS Code"))

class Meta:
ordering = ("code",)
Expand Down

0 comments on commit c6cfd5e

Please sign in to comment.