# Generated by Django 5.2.11 on 2026-02-26 04:29

import django.contrib.gis.db.models.fields
import django.core.validators
import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("contenttypes", "0002_remove_content_type_name"),
    ]

    operations = [
        migrations.CreateModel(
            name="CrosswalkDataset",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Dataset name (e.g., '2010-2020 Tract Crosswalk')",
                        max_length=100,
                        unique=True,
                    ),
                ),
                (
                    "source_year",
                    models.PositiveSmallIntegerField(
                        help_text="Source (earlier) Census year"
                    ),
                ),
                (
                    "target_year",
                    models.PositiveSmallIntegerField(
                        help_text="Target (later) Census year"
                    ),
                ),
                (
                    "geography_type",
                    models.CharField(help_text="Geography type covered", max_length=20),
                ),
                (
                    "source_url",
                    models.URLField(
                        blank=True, help_text="URL where data was downloaded from"
                    ),
                ),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="Description of this dataset"
                    ),
                ),
                (
                    "record_count",
                    models.PositiveIntegerField(
                        default=0, help_text="Number of crosswalk records"
                    ),
                ),
                (
                    "states_covered",
                    models.JSONField(
                        default=list, help_text="List of state FIPS codes included"
                    ),
                ),
                (
                    "loaded_at",
                    models.DateTimeField(
                        auto_now_add=True, help_text="When this dataset was loaded"
                    ),
                ),
            ],
            options={
                "verbose_name": "Crosswalk Dataset",
                "verbose_name_plural": "Crosswalk Datasets",
            },
        ),
        migrations.CreateModel(
            name="GADMAdmin1",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "feature_id",
                    models.CharField(
                        db_index=True,
                        help_text="Stable identifier for this feature (unique per vintage_year)",
                        max_length=60,
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Human-readable name of this feature", max_length=255
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Edition year of the source dataset",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "valid_from",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature became effective (NULL = always valid)",
                        null=True,
                    ),
                ),
                (
                    "valid_to",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature ceased to be effective (NULL = still valid)",
                        null=True,
                    ),
                ),
                (
                    "source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Provenance of this feature (e.g. TIGER/Line, GADM, OSM)",
                        max_length=50,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Boundary identifier (synced from feature_id)",
                        max_length=60,
                    ),
                ),
                (
                    "geometry",
                    django.contrib.gis.db.models.fields.MultiPolygonField(
                        help_text="Boundary geometry (WGS 84)", srid=4326
                    ),
                ),
                (
                    "area_land",
                    models.BigIntegerField(
                        blank=True, help_text="Land area in square meters", null=True
                    ),
                ),
                (
                    "area_water",
                    models.BigIntegerField(
                        blank=True, help_text="Water area in square meters", null=True
                    ),
                ),
                (
                    "internal_point",
                    django.contrib.gis.db.models.fields.PointField(
                        blank=True,
                        help_text="Representative interior point (INTPTLAT/INTPTLON)",
                        null=True,
                        srid=4326,
                    ),
                ),
                (
                    "gid",
                    models.CharField(
                        db_index=True,
                        help_text="GADM identifier (e.g. 'USA', 'USA.5_1')",
                        max_length=50,
                    ),
                ),
                (
                    "gid_0_string",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="GID_0 string for parallel loading (resolved to FK post-load)",
                        max_length=50,
                    ),
                ),
                (
                    "type_1",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Administrative type (e.g. 'State', 'Province', 'Region')",
                        max_length=50,
                    ),
                ),
                (
                    "engtype_1",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="English type name",
                        max_length=50,
                    ),
                ),
            ],
            options={
                "verbose_name": "GADM Admin Level 1",
                "verbose_name_plural": "GADM Admin Level 1",
            },
        ),
        migrations.CreateModel(
            name="BoundaryIntersection",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "source_type",
                    models.CharField(
                        db_index=True,
                        help_text="Geography type of source boundary",
                        max_length=50,
                    ),
                ),
                (
                    "source_boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Identifier of the source boundary",
                        max_length=60,
                    ),
                ),
                (
                    "target_type",
                    models.CharField(
                        db_index=True,
                        help_text="Geography type of target boundary",
                        max_length=50,
                    ),
                ),
                (
                    "target_boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Identifier of the target boundary",
                        max_length=60,
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Vintage year for both boundaries",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "intersection_area",
                    models.BigIntegerField(
                        blank=True,
                        help_text="Area of intersection in square meters",
                        null=True,
                    ),
                ),
                (
                    "pct_of_source",
                    models.DecimalField(
                        blank=True,
                        decimal_places=6,
                        help_text="Fraction of source boundary area in intersection (0-1)",
                        max_digits=7,
                        null=True,
                    ),
                ),
                (
                    "pct_of_target",
                    models.DecimalField(
                        blank=True,
                        decimal_places=6,
                        help_text="Fraction of target boundary area in intersection (0-1)",
                        max_digits=7,
                        null=True,
                    ),
                ),
                (
                    "is_dominant",
                    models.BooleanField(
                        db_index=True,
                        default=False,
                        help_text="True if this is the largest intersection for the source",
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
            ],
            options={
                "verbose_name": "Boundary Intersection",
                "verbose_name_plural": "Boundary Intersections",
                "indexes": [
                    models.Index(
                        fields=["source_type", "source_boundary_id", "vintage_year"],
                        name="siege_geo_b_source__4963d0_idx",
                    ),
                    models.Index(
                        fields=["target_type", "target_boundary_id", "vintage_year"],
                        name="siege_geo_b_target__9d8878_idx",
                    ),
                    models.Index(
                        fields=["source_type", "target_type", "vintage_year"],
                        name="siege_geo_b_source__b252dd_idx",
                    ),
                    models.Index(
                        fields=["is_dominant"], name="siege_geo_b_is_domi_b92a3f_idx"
                    ),
                ],
                "unique_together": {
                    (
                        "source_type",
                        "source_boundary_id",
                        "target_type",
                        "target_boundary_id",
                        "vintage_year",
                    )
                },
            },
        ),
        migrations.CreateModel(
            name="CBSA",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "feature_id",
                    models.CharField(
                        db_index=True,
                        help_text="Stable identifier for this feature (unique per vintage_year)",
                        max_length=60,
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Human-readable name of this feature", max_length=255
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Edition year of the source dataset",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "valid_from",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature became effective (NULL = always valid)",
                        null=True,
                    ),
                ),
                (
                    "valid_to",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature ceased to be effective (NULL = still valid)",
                        null=True,
                    ),
                ),
                (
                    "source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Provenance of this feature (e.g. TIGER/Line, GADM, OSM)",
                        max_length=50,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Boundary identifier (synced from feature_id)",
                        max_length=60,
                    ),
                ),
                (
                    "geometry",
                    django.contrib.gis.db.models.fields.MultiPolygonField(
                        help_text="Boundary geometry (WGS 84)", srid=4326
                    ),
                ),
                (
                    "area_land",
                    models.BigIntegerField(
                        blank=True, help_text="Land area in square meters", null=True
                    ),
                ),
                (
                    "area_water",
                    models.BigIntegerField(
                        blank=True, help_text="Water area in square meters", null=True
                    ),
                ),
                (
                    "internal_point",
                    django.contrib.gis.db.models.fields.PointField(
                        blank=True,
                        help_text="Representative interior point (INTPTLAT/INTPTLON)",
                        null=True,
                        srid=4326,
                    ),
                ),
                (
                    "geoid",
                    models.CharField(
                        db_index=True,
                        help_text="Full Census GEOID that uniquely identifies this geography",
                        max_length=20,
                    ),
                ),
                (
                    "state_fips",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="2-digit state FIPS code",
                        max_length=2,
                    ),
                ),
                (
                    "lsad",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Legal/Statistical Area Description code",
                        max_length=2,
                    ),
                ),
                (
                    "mtfcc",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="MAF/TIGER Feature Class Code",
                        max_length=5,
                    ),
                ),
                (
                    "funcstat",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Functional status code from TIGER/Line",
                        max_length=1,
                    ),
                ),
                (
                    "cbsa_type",
                    models.CharField(
                        choices=[
                            ("metro", "Metropolitan Statistical Area"),
                            ("micro", "Micropolitan Statistical Area"),
                        ],
                        db_index=True,
                        help_text="Metro or Micro statistical area",
                        max_length=5,
                    ),
                ),
                (
                    "csa_code",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="Combined Statistical Area code (if part of a CSA)",
                        max_length=5,
                    ),
                ),
                (
                    "csa_name",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Combined Statistical Area name",
                        max_length=255,
                    ),
                ),
                (
                    "principal_city",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Name of the principal city",
                        max_length=255,
                    ),
                ),
            ],
            options={
                "verbose_name": "CBSA",
                "verbose_name_plural": "CBSAs",
                "indexes": [
                    models.Index(
                        fields=["cbsa_type"], name="siege_geo_c_cbsa_ty_1019ae_idx"
                    ),
                    models.Index(
                        fields=["csa_code"], name="siege_geo_c_csa_cod_c13a5c_idx"
                    ),
                    models.Index(
                        fields=["vintage_year"], name="siege_geo_c_vintage_a6f272_idx"
                    ),
                ],
                "unique_together": {("geoid", "vintage_year")},
            },
        ),
        migrations.CreateModel(
            name="DemographicVariable",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "code",
                    models.CharField(
                        db_index=True,
                        help_text="Census variable code (e.g., B01001_001E)",
                        max_length=20,
                    ),
                ),
                (
                    "label",
                    models.CharField(
                        help_text="Human-readable label for this variable",
                        max_length=255,
                    ),
                ),
                (
                    "concept",
                    models.CharField(
                        blank=True,
                        help_text="Census concept/table this variable belongs to",
                        max_length=255,
                    ),
                ),
                (
                    "dataset",
                    models.CharField(
                        choices=[
                            ("acs5", "American Community Survey 5-Year"),
                            ("acs1", "American Community Survey 1-Year"),
                            ("dec", "Decennial Census"),
                            ("dec_pl", "Decennial Census P.L. 94-171"),
                        ],
                        db_index=True,
                        help_text="Census dataset this variable is from",
                        max_length=10,
                    ),
                ),
                (
                    "predicate_type",
                    models.CharField(
                        blank=True,
                        help_text="Data type (int, float, string)",
                        max_length=20,
                    ),
                ),
                (
                    "group",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        help_text="Variable group code (e.g., B01001)",
                        max_length=20,
                    ),
                ),
                (
                    "universe",
                    models.CharField(
                        blank=True,
                        help_text="Population universe for this variable",
                        max_length=255,
                    ),
                ),
            ],
            options={
                "verbose_name": "Demographic Variable",
                "verbose_name_plural": "Demographic Variables",
                "indexes": [
                    models.Index(
                        fields=["group", "dataset"], name="siege_geo_d_group_2897d2_idx"
                    )
                ],
                "unique_together": {("code", "dataset")},
            },
        ),
        migrations.CreateModel(
            name="FederalJudicialDistrict",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "feature_id",
                    models.CharField(
                        db_index=True,
                        help_text="Stable identifier for this feature (unique per vintage_year)",
                        max_length=60,
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Human-readable name of this feature", max_length=255
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Edition year of the source dataset",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "valid_from",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature became effective (NULL = always valid)",
                        null=True,
                    ),
                ),
                (
                    "valid_to",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature ceased to be effective (NULL = still valid)",
                        null=True,
                    ),
                ),
                (
                    "source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Provenance of this feature (e.g. TIGER/Line, GADM, OSM)",
                        max_length=50,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Boundary identifier (synced from feature_id)",
                        max_length=60,
                    ),
                ),
                (
                    "geometry",
                    django.contrib.gis.db.models.fields.MultiPolygonField(
                        help_text="Boundary geometry (WGS 84)", srid=4326
                    ),
                ),
                (
                    "area_land",
                    models.BigIntegerField(
                        blank=True, help_text="Land area in square meters", null=True
                    ),
                ),
                (
                    "area_water",
                    models.BigIntegerField(
                        blank=True, help_text="Water area in square meters", null=True
                    ),
                ),
                (
                    "internal_point",
                    django.contrib.gis.db.models.fields.PointField(
                        blank=True,
                        help_text="Representative interior point (INTPTLAT/INTPTLON)",
                        null=True,
                        srid=4326,
                    ),
                ),
                (
                    "district_code",
                    models.CharField(
                        db_index=True,
                        help_text="District code (e.g. 'CACD' for Central District of California)",
                        max_length=10,
                    ),
                ),
                (
                    "district_name",
                    models.CharField(help_text="Full district name", max_length=100),
                ),
                (
                    "circuit_number",
                    models.PositiveSmallIntegerField(
                        blank=True,
                        db_index=True,
                        help_text="Circuit court number (1-11, plus DC=12, Federal=13)",
                        null=True,
                    ),
                ),
                (
                    "state_fips",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="Primary state FIPS code (some districts span states)",
                        max_length=2,
                    ),
                ),
            ],
            options={
                "verbose_name": "Federal Judicial District",
                "verbose_name_plural": "Federal Judicial Districts",
                "indexes": [
                    models.Index(
                        fields=["district_code"], name="siege_geo_f_distric_841ad2_idx"
                    ),
                    models.Index(
                        fields=["circuit_number"], name="siege_geo_f_circuit_b91ca0_idx"
                    ),
                    models.Index(
                        fields=["state_fips"], name="siege_geo_f_state_f_52b15f_idx"
                    ),
                    models.Index(
                        fields=["vintage_year"], name="siege_geo_f_vintage_383f07_idx"
                    ),
                ],
                "unique_together": {("feature_id", "vintage_year")},
            },
        ),
        migrations.CreateModel(
            name="GADMAdmin2",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "feature_id",
                    models.CharField(
                        db_index=True,
                        help_text="Stable identifier for this feature (unique per vintage_year)",
                        max_length=60,
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Human-readable name of this feature", max_length=255
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Edition year of the source dataset",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "valid_from",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature became effective (NULL = always valid)",
                        null=True,
                    ),
                ),
                (
                    "valid_to",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature ceased to be effective (NULL = still valid)",
                        null=True,
                    ),
                ),
                (
                    "source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Provenance of this feature (e.g. TIGER/Line, GADM, OSM)",
                        max_length=50,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Boundary identifier (synced from feature_id)",
                        max_length=60,
                    ),
                ),
                (
                    "geometry",
                    django.contrib.gis.db.models.fields.MultiPolygonField(
                        help_text="Boundary geometry (WGS 84)", srid=4326
                    ),
                ),
                (
                    "area_land",
                    models.BigIntegerField(
                        blank=True, help_text="Land area in square meters", null=True
                    ),
                ),
                (
                    "area_water",
                    models.BigIntegerField(
                        blank=True, help_text="Water area in square meters", null=True
                    ),
                ),
                (
                    "internal_point",
                    django.contrib.gis.db.models.fields.PointField(
                        blank=True,
                        help_text="Representative interior point (INTPTLAT/INTPTLON)",
                        null=True,
                        srid=4326,
                    ),
                ),
                (
                    "gid",
                    models.CharField(
                        db_index=True,
                        help_text="GADM identifier (e.g. 'USA', 'USA.5_1')",
                        max_length=50,
                    ),
                ),
                (
                    "gid_1_string",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="GID_1 string for parallel loading",
                        max_length=50,
                    ),
                ),
                (
                    "type_2",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Administrative type",
                        max_length=50,
                    ),
                ),
                (
                    "engtype_2",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="English type name",
                        max_length=50,
                    ),
                ),
                (
                    "admin1",
                    models.ForeignKey(
                        help_text="Parent admin1",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="admin2s",
                        to="siege_geo.gadmadmin1",
                    ),
                ),
            ],
            options={
                "verbose_name": "GADM Admin Level 2",
                "verbose_name_plural": "GADM Admin Level 2",
                "unique_together": {("gid", "vintage_year")},
            },
        ),
        migrations.CreateModel(
            name="GADMAdmin3",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "feature_id",
                    models.CharField(
                        db_index=True,
                        help_text="Stable identifier for this feature (unique per vintage_year)",
                        max_length=60,
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Human-readable name of this feature", max_length=255
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Edition year of the source dataset",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "valid_from",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature became effective (NULL = always valid)",
                        null=True,
                    ),
                ),
                (
                    "valid_to",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature ceased to be effective (NULL = still valid)",
                        null=True,
                    ),
                ),
                (
                    "source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Provenance of this feature (e.g. TIGER/Line, GADM, OSM)",
                        max_length=50,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Boundary identifier (synced from feature_id)",
                        max_length=60,
                    ),
                ),
                (
                    "geometry",
                    django.contrib.gis.db.models.fields.MultiPolygonField(
                        help_text="Boundary geometry (WGS 84)", srid=4326
                    ),
                ),
                (
                    "area_land",
                    models.BigIntegerField(
                        blank=True, help_text="Land area in square meters", null=True
                    ),
                ),
                (
                    "area_water",
                    models.BigIntegerField(
                        blank=True, help_text="Water area in square meters", null=True
                    ),
                ),
                (
                    "internal_point",
                    django.contrib.gis.db.models.fields.PointField(
                        blank=True,
                        help_text="Representative interior point (INTPTLAT/INTPTLON)",
                        null=True,
                        srid=4326,
                    ),
                ),
                (
                    "gid",
                    models.CharField(
                        db_index=True,
                        help_text="GADM identifier (e.g. 'USA', 'USA.5_1')",
                        max_length=50,
                    ),
                ),
                (
                    "gid_2_string",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="GID_2 string for parallel loading",
                        max_length=50,
                    ),
                ),
                (
                    "type_3",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Administrative type",
                        max_length=50,
                    ),
                ),
                (
                    "engtype_3",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="English type name",
                        max_length=50,
                    ),
                ),
                (
                    "admin2",
                    models.ForeignKey(
                        help_text="Parent admin2",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="admin3s",
                        to="siege_geo.gadmadmin2",
                    ),
                ),
            ],
            options={
                "verbose_name": "GADM Admin Level 3",
                "verbose_name_plural": "GADM Admin Level 3",
                "unique_together": {("gid", "vintage_year")},
            },
        ),
        migrations.CreateModel(
            name="GADMAdmin4",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "feature_id",
                    models.CharField(
                        db_index=True,
                        help_text="Stable identifier for this feature (unique per vintage_year)",
                        max_length=60,
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Human-readable name of this feature", max_length=255
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Edition year of the source dataset",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "valid_from",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature became effective (NULL = always valid)",
                        null=True,
                    ),
                ),
                (
                    "valid_to",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature ceased to be effective (NULL = still valid)",
                        null=True,
                    ),
                ),
                (
                    "source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Provenance of this feature (e.g. TIGER/Line, GADM, OSM)",
                        max_length=50,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Boundary identifier (synced from feature_id)",
                        max_length=60,
                    ),
                ),
                (
                    "geometry",
                    django.contrib.gis.db.models.fields.MultiPolygonField(
                        help_text="Boundary geometry (WGS 84)", srid=4326
                    ),
                ),
                (
                    "area_land",
                    models.BigIntegerField(
                        blank=True, help_text="Land area in square meters", null=True
                    ),
                ),
                (
                    "area_water",
                    models.BigIntegerField(
                        blank=True, help_text="Water area in square meters", null=True
                    ),
                ),
                (
                    "internal_point",
                    django.contrib.gis.db.models.fields.PointField(
                        blank=True,
                        help_text="Representative interior point (INTPTLAT/INTPTLON)",
                        null=True,
                        srid=4326,
                    ),
                ),
                (
                    "gid",
                    models.CharField(
                        db_index=True,
                        help_text="GADM identifier (e.g. 'USA', 'USA.5_1')",
                        max_length=50,
                    ),
                ),
                (
                    "gid_3_string",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="GID_3 string for parallel loading",
                        max_length=50,
                    ),
                ),
                (
                    "type_4",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Administrative type",
                        max_length=50,
                    ),
                ),
                (
                    "engtype_4",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="English type name",
                        max_length=50,
                    ),
                ),
                (
                    "admin3",
                    models.ForeignKey(
                        help_text="Parent admin3",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="admin4s",
                        to="siege_geo.gadmadmin3",
                    ),
                ),
            ],
            options={
                "verbose_name": "GADM Admin Level 4",
                "verbose_name_plural": "GADM Admin Level 4",
                "unique_together": {("gid", "vintage_year")},
            },
        ),
        migrations.CreateModel(
            name="GADMCountry",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "feature_id",
                    models.CharField(
                        db_index=True,
                        help_text="Stable identifier for this feature (unique per vintage_year)",
                        max_length=60,
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Human-readable name of this feature", max_length=255
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Edition year of the source dataset",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "valid_from",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature became effective (NULL = always valid)",
                        null=True,
                    ),
                ),
                (
                    "valid_to",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature ceased to be effective (NULL = still valid)",
                        null=True,
                    ),
                ),
                (
                    "source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Provenance of this feature (e.g. TIGER/Line, GADM, OSM)",
                        max_length=50,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Boundary identifier (synced from feature_id)",
                        max_length=60,
                    ),
                ),
                (
                    "geometry",
                    django.contrib.gis.db.models.fields.MultiPolygonField(
                        help_text="Boundary geometry (WGS 84)", srid=4326
                    ),
                ),
                (
                    "area_land",
                    models.BigIntegerField(
                        blank=True, help_text="Land area in square meters", null=True
                    ),
                ),
                (
                    "area_water",
                    models.BigIntegerField(
                        blank=True, help_text="Water area in square meters", null=True
                    ),
                ),
                (
                    "internal_point",
                    django.contrib.gis.db.models.fields.PointField(
                        blank=True,
                        help_text="Representative interior point (INTPTLAT/INTPTLON)",
                        null=True,
                        srid=4326,
                    ),
                ),
                (
                    "gid",
                    models.CharField(
                        db_index=True,
                        help_text="GADM identifier (e.g. 'USA', 'USA.5_1')",
                        max_length=50,
                    ),
                ),
                (
                    "iso3",
                    models.CharField(
                        db_index=True,
                        help_text="ISO 3166-1 alpha-3 country code",
                        max_length=3,
                    ),
                ),
            ],
            options={
                "verbose_name": "GADM Country",
                "verbose_name_plural": "GADM Countries",
                "indexes": [
                    models.Index(fields=["iso3"], name="siege_geo_g_iso3_a59f7f_idx")
                ],
                "unique_together": {("gid", "vintage_year")},
            },
        ),
        migrations.AddField(
            model_name="gadmadmin1",
            name="country",
            field=models.ForeignKey(
                help_text="Parent country",
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="admin1s",
                to="siege_geo.gadmcountry",
            ),
        ),
        migrations.CreateModel(
            name="NLRBRegion",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "feature_id",
                    models.CharField(
                        db_index=True,
                        help_text="Stable identifier for this feature (unique per vintage_year)",
                        max_length=60,
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Human-readable name of this feature", max_length=255
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Edition year of the source dataset",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "valid_from",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature became effective (NULL = always valid)",
                        null=True,
                    ),
                ),
                (
                    "valid_to",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature ceased to be effective (NULL = still valid)",
                        null=True,
                    ),
                ),
                (
                    "source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Provenance of this feature (e.g. TIGER/Line, GADM, OSM)",
                        max_length=50,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Boundary identifier (synced from feature_id)",
                        max_length=60,
                    ),
                ),
                (
                    "geometry",
                    django.contrib.gis.db.models.fields.MultiPolygonField(
                        help_text="Boundary geometry (WGS 84)", srid=4326
                    ),
                ),
                (
                    "area_land",
                    models.BigIntegerField(
                        blank=True, help_text="Land area in square meters", null=True
                    ),
                ),
                (
                    "area_water",
                    models.BigIntegerField(
                        blank=True, help_text="Water area in square meters", null=True
                    ),
                ),
                (
                    "internal_point",
                    django.contrib.gis.db.models.fields.PointField(
                        blank=True,
                        help_text="Representative interior point (INTPTLAT/INTPTLON)",
                        null=True,
                        srid=4326,
                    ),
                ),
                (
                    "region_number",
                    models.PositiveSmallIntegerField(
                        db_index=True, help_text="NLRB region number (1-34, with gaps)"
                    ),
                ),
                (
                    "region_office",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Regional office city (e.g. 'Boston', 'New York')",
                        max_length=100,
                    ),
                ),
                (
                    "states_covered",
                    models.JSONField(
                        blank=True,
                        default=list,
                        help_text="List of state FIPS codes or abbreviations covered",
                    ),
                ),
            ],
            options={
                "verbose_name": "NLRB Region",
                "verbose_name_plural": "NLRB Regions",
                "indexes": [
                    models.Index(
                        fields=["region_number"], name="siege_geo_n_region__5a1485_idx"
                    ),
                    models.Index(
                        fields=["vintage_year"], name="siege_geo_n_vintage_4ba57d_idx"
                    ),
                ],
                "unique_together": {("feature_id", "vintage_year")},
            },
        ),
        migrations.CreateModel(
            name="State",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "feature_id",
                    models.CharField(
                        db_index=True,
                        help_text="Stable identifier for this feature (unique per vintage_year)",
                        max_length=60,
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Human-readable name of this feature", max_length=255
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Edition year of the source dataset",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "valid_from",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature became effective (NULL = always valid)",
                        null=True,
                    ),
                ),
                (
                    "valid_to",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature ceased to be effective (NULL = still valid)",
                        null=True,
                    ),
                ),
                (
                    "source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Provenance of this feature (e.g. TIGER/Line, GADM, OSM)",
                        max_length=50,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Boundary identifier (synced from feature_id)",
                        max_length=60,
                    ),
                ),
                (
                    "geometry",
                    django.contrib.gis.db.models.fields.MultiPolygonField(
                        help_text="Boundary geometry (WGS 84)", srid=4326
                    ),
                ),
                (
                    "area_land",
                    models.BigIntegerField(
                        blank=True, help_text="Land area in square meters", null=True
                    ),
                ),
                (
                    "area_water",
                    models.BigIntegerField(
                        blank=True, help_text="Water area in square meters", null=True
                    ),
                ),
                (
                    "internal_point",
                    django.contrib.gis.db.models.fields.PointField(
                        blank=True,
                        help_text="Representative interior point (INTPTLAT/INTPTLON)",
                        null=True,
                        srid=4326,
                    ),
                ),
                (
                    "geoid",
                    models.CharField(
                        db_index=True,
                        help_text="Full Census GEOID that uniquely identifies this geography",
                        max_length=20,
                    ),
                ),
                (
                    "state_fips",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="2-digit state FIPS code",
                        max_length=2,
                    ),
                ),
                (
                    "lsad",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Legal/Statistical Area Description code",
                        max_length=2,
                    ),
                ),
                (
                    "mtfcc",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="MAF/TIGER Feature Class Code",
                        max_length=5,
                    ),
                ),
                (
                    "funcstat",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Functional status code from TIGER/Line",
                        max_length=1,
                    ),
                ),
                (
                    "abbreviation",
                    models.CharField(
                        db_index=True,
                        help_text="2-letter state abbreviation (e.g., CA)",
                        max_length=2,
                    ),
                ),
                (
                    "region",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Census region (e.g., West, South, Northeast, Midwest)",
                        max_length=20,
                    ),
                ),
                (
                    "division",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Census division (e.g., Pacific, Mountain, East South Central)",
                        max_length=30,
                    ),
                ),
            ],
            options={
                "verbose_name": "State",
                "verbose_name_plural": "States",
                "indexes": [
                    models.Index(
                        fields=["state_fips", "vintage_year"],
                        name="siege_geo_s_state_f_ee6939_idx",
                    ),
                    models.Index(
                        fields=["abbreviation"], name="siege_geo_s_abbrevi_bbcd97_idx"
                    ),
                ],
                "unique_together": {("geoid", "vintage_year")},
            },
        ),
        migrations.CreateModel(
            name="County",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "feature_id",
                    models.CharField(
                        db_index=True,
                        help_text="Stable identifier for this feature (unique per vintage_year)",
                        max_length=60,
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Human-readable name of this feature", max_length=255
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Edition year of the source dataset",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "valid_from",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature became effective (NULL = always valid)",
                        null=True,
                    ),
                ),
                (
                    "valid_to",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature ceased to be effective (NULL = still valid)",
                        null=True,
                    ),
                ),
                (
                    "source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Provenance of this feature (e.g. TIGER/Line, GADM, OSM)",
                        max_length=50,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Boundary identifier (synced from feature_id)",
                        max_length=60,
                    ),
                ),
                (
                    "geometry",
                    django.contrib.gis.db.models.fields.MultiPolygonField(
                        help_text="Boundary geometry (WGS 84)", srid=4326
                    ),
                ),
                (
                    "area_land",
                    models.BigIntegerField(
                        blank=True, help_text="Land area in square meters", null=True
                    ),
                ),
                (
                    "area_water",
                    models.BigIntegerField(
                        blank=True, help_text="Water area in square meters", null=True
                    ),
                ),
                (
                    "internal_point",
                    django.contrib.gis.db.models.fields.PointField(
                        blank=True,
                        help_text="Representative interior point (INTPTLAT/INTPTLON)",
                        null=True,
                        srid=4326,
                    ),
                ),
                (
                    "geoid",
                    models.CharField(
                        db_index=True,
                        help_text="Full Census GEOID that uniquely identifies this geography",
                        max_length=20,
                    ),
                ),
                (
                    "state_fips",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="2-digit state FIPS code",
                        max_length=2,
                    ),
                ),
                (
                    "lsad",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Legal/Statistical Area Description code",
                        max_length=2,
                    ),
                ),
                (
                    "mtfcc",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="MAF/TIGER Feature Class Code",
                        max_length=5,
                    ),
                ),
                (
                    "funcstat",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Functional status code from TIGER/Line",
                        max_length=1,
                    ),
                ),
                (
                    "county_fips",
                    models.CharField(
                        db_index=True,
                        help_text="3-digit county FIPS code",
                        max_length=3,
                    ),
                ),
                (
                    "county_name",
                    models.CharField(
                        blank=True,
                        help_text="County name without 'County' suffix",
                        max_length=100,
                    ),
                ),
                (
                    "state",
                    models.ForeignKey(
                        help_text="Parent state",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="counties",
                        to="siege_geo.state",
                    ),
                ),
            ],
            options={
                "verbose_name": "County",
                "verbose_name_plural": "Counties",
            },
        ),
        migrations.CreateModel(
            name="CongressionalDistrict",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "feature_id",
                    models.CharField(
                        db_index=True,
                        help_text="Stable identifier for this feature (unique per vintage_year)",
                        max_length=60,
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Human-readable name of this feature", max_length=255
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Edition year of the source dataset",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "valid_from",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature became effective (NULL = always valid)",
                        null=True,
                    ),
                ),
                (
                    "valid_to",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature ceased to be effective (NULL = still valid)",
                        null=True,
                    ),
                ),
                (
                    "source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Provenance of this feature (e.g. TIGER/Line, GADM, OSM)",
                        max_length=50,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Boundary identifier (synced from feature_id)",
                        max_length=60,
                    ),
                ),
                (
                    "geometry",
                    django.contrib.gis.db.models.fields.MultiPolygonField(
                        help_text="Boundary geometry (WGS 84)", srid=4326
                    ),
                ),
                (
                    "area_land",
                    models.BigIntegerField(
                        blank=True, help_text="Land area in square meters", null=True
                    ),
                ),
                (
                    "area_water",
                    models.BigIntegerField(
                        blank=True, help_text="Water area in square meters", null=True
                    ),
                ),
                (
                    "internal_point",
                    django.contrib.gis.db.models.fields.PointField(
                        blank=True,
                        help_text="Representative interior point (INTPTLAT/INTPTLON)",
                        null=True,
                        srid=4326,
                    ),
                ),
                (
                    "geoid",
                    models.CharField(
                        db_index=True,
                        help_text="Full Census GEOID that uniquely identifies this geography",
                        max_length=20,
                    ),
                ),
                (
                    "state_fips",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="2-digit state FIPS code",
                        max_length=2,
                    ),
                ),
                (
                    "lsad",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Legal/Statistical Area Description code",
                        max_length=2,
                    ),
                ),
                (
                    "mtfcc",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="MAF/TIGER Feature Class Code",
                        max_length=5,
                    ),
                ),
                (
                    "funcstat",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Functional status code from TIGER/Line",
                        max_length=1,
                    ),
                ),
                (
                    "district_number",
                    models.CharField(
                        db_index=True,
                        help_text="2-digit district number (00=at-large)",
                        max_length=2,
                    ),
                ),
                (
                    "congress_number",
                    models.PositiveSmallIntegerField(
                        blank=True,
                        help_text="Congress number (e.g., 118 for 118th Congress)",
                        null=True,
                    ),
                ),
                (
                    "session",
                    models.CharField(
                        blank=True,
                        help_text="Session identifier (e.g., '118' or '2023')",
                        max_length=4,
                    ),
                ),
                (
                    "state",
                    models.ForeignKey(
                        help_text="Parent state",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="congressional_districts",
                        to="siege_geo.state",
                    ),
                ),
            ],
            options={
                "verbose_name": "Congressional District",
                "verbose_name_plural": "Congressional Districts",
            },
        ),
        migrations.CreateModel(
            name="StateLegislativeLower",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "feature_id",
                    models.CharField(
                        db_index=True,
                        help_text="Stable identifier for this feature (unique per vintage_year)",
                        max_length=60,
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Human-readable name of this feature", max_length=255
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Edition year of the source dataset",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "valid_from",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature became effective (NULL = always valid)",
                        null=True,
                    ),
                ),
                (
                    "valid_to",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature ceased to be effective (NULL = still valid)",
                        null=True,
                    ),
                ),
                (
                    "source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Provenance of this feature (e.g. TIGER/Line, GADM, OSM)",
                        max_length=50,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Boundary identifier (synced from feature_id)",
                        max_length=60,
                    ),
                ),
                (
                    "geometry",
                    django.contrib.gis.db.models.fields.MultiPolygonField(
                        help_text="Boundary geometry (WGS 84)", srid=4326
                    ),
                ),
                (
                    "area_land",
                    models.BigIntegerField(
                        blank=True, help_text="Land area in square meters", null=True
                    ),
                ),
                (
                    "area_water",
                    models.BigIntegerField(
                        blank=True, help_text="Water area in square meters", null=True
                    ),
                ),
                (
                    "internal_point",
                    django.contrib.gis.db.models.fields.PointField(
                        blank=True,
                        help_text="Representative interior point (INTPTLAT/INTPTLON)",
                        null=True,
                        srid=4326,
                    ),
                ),
                (
                    "geoid",
                    models.CharField(
                        db_index=True,
                        help_text="Full Census GEOID that uniquely identifies this geography",
                        max_length=20,
                    ),
                ),
                (
                    "state_fips",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="2-digit state FIPS code",
                        max_length=2,
                    ),
                ),
                (
                    "lsad",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Legal/Statistical Area Description code",
                        max_length=2,
                    ),
                ),
                (
                    "mtfcc",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="MAF/TIGER Feature Class Code",
                        max_length=5,
                    ),
                ),
                (
                    "funcstat",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Functional status code from TIGER/Line",
                        max_length=1,
                    ),
                ),
                (
                    "district_number",
                    models.CharField(
                        db_index=True, help_text="3-digit district number", max_length=3
                    ),
                ),
                (
                    "state",
                    models.ForeignKey(
                        help_text="Parent state",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="legislative_lower_districts",
                        to="siege_geo.state",
                    ),
                ),
            ],
            options={
                "verbose_name": "State Legislative District (Lower)",
                "verbose_name_plural": "State Legislative Districts (Lower)",
            },
        ),
        migrations.CreateModel(
            name="StateLegislativeUpper",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "feature_id",
                    models.CharField(
                        db_index=True,
                        help_text="Stable identifier for this feature (unique per vintage_year)",
                        max_length=60,
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Human-readable name of this feature", max_length=255
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Edition year of the source dataset",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "valid_from",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature became effective (NULL = always valid)",
                        null=True,
                    ),
                ),
                (
                    "valid_to",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature ceased to be effective (NULL = still valid)",
                        null=True,
                    ),
                ),
                (
                    "source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Provenance of this feature (e.g. TIGER/Line, GADM, OSM)",
                        max_length=50,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Boundary identifier (synced from feature_id)",
                        max_length=60,
                    ),
                ),
                (
                    "geometry",
                    django.contrib.gis.db.models.fields.MultiPolygonField(
                        help_text="Boundary geometry (WGS 84)", srid=4326
                    ),
                ),
                (
                    "area_land",
                    models.BigIntegerField(
                        blank=True, help_text="Land area in square meters", null=True
                    ),
                ),
                (
                    "area_water",
                    models.BigIntegerField(
                        blank=True, help_text="Water area in square meters", null=True
                    ),
                ),
                (
                    "internal_point",
                    django.contrib.gis.db.models.fields.PointField(
                        blank=True,
                        help_text="Representative interior point (INTPTLAT/INTPTLON)",
                        null=True,
                        srid=4326,
                    ),
                ),
                (
                    "geoid",
                    models.CharField(
                        db_index=True,
                        help_text="Full Census GEOID that uniquely identifies this geography",
                        max_length=20,
                    ),
                ),
                (
                    "state_fips",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="2-digit state FIPS code",
                        max_length=2,
                    ),
                ),
                (
                    "lsad",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Legal/Statistical Area Description code",
                        max_length=2,
                    ),
                ),
                (
                    "mtfcc",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="MAF/TIGER Feature Class Code",
                        max_length=5,
                    ),
                ),
                (
                    "funcstat",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Functional status code from TIGER/Line",
                        max_length=1,
                    ),
                ),
                (
                    "district_number",
                    models.CharField(
                        db_index=True, help_text="3-digit district number", max_length=3
                    ),
                ),
                (
                    "state",
                    models.ForeignKey(
                        help_text="Parent state",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="legislative_upper_districts",
                        to="siege_geo.state",
                    ),
                ),
            ],
            options={
                "verbose_name": "State Legislative District (Upper)",
                "verbose_name_plural": "State Legislative Districts (Upper)",
            },
        ),
        migrations.CreateModel(
            name="TemporalCrosswalk",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "source_boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Identifier of the source (earlier vintage) boundary",
                        max_length=60,
                    ),
                ),
                (
                    "source_vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Vintage year of the source boundary",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "source_type",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="Geography type of source (e.g. tract, county, gadm_admin1)",
                        max_length=50,
                    ),
                ),
                (
                    "target_boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Identifier of the target (later vintage) boundary",
                        max_length=60,
                    ),
                ),
                (
                    "target_vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Vintage year of the target boundary",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "target_type",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="Geography type of target (e.g. tract, county, gadm_admin1)",
                        max_length=50,
                    ),
                ),
                (
                    "relationship",
                    models.CharField(
                        choices=[
                            ("IDENTICAL", "Identical (no change)"),
                            ("SPLIT", "Split (one-to-many)"),
                            ("MERGED", "Merged (many-to-one)"),
                            ("PARTIAL", "Partial overlap"),
                            ("RENAMED", "Renamed (ID changed, boundary same)"),
                        ],
                        db_index=True,
                        help_text="Type of relationship between boundaries",
                        max_length=20,
                    ),
                ),
                (
                    "weight",
                    models.DecimalField(
                        decimal_places=8,
                        help_text="Allocation weight (0-1) for this relationship",
                        max_digits=10,
                        validators=[
                            django.core.validators.MinValueValidator(0),
                            django.core.validators.MaxValueValidator(1),
                        ],
                    ),
                ),
                (
                    "weight_type",
                    models.CharField(
                        choices=[
                            ("population", "Population-weighted"),
                            ("housing", "Housing unit-weighted"),
                            ("area", "Area-weighted"),
                            ("land_area", "Land area-weighted"),
                        ],
                        default="population",
                        help_text="How the weight was calculated",
                        max_length=20,
                    ),
                ),
                (
                    "state_fips",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        help_text="State FIPS code (for filtering)",
                        max_length=2,
                    ),
                ),
                (
                    "source_population",
                    models.PositiveIntegerField(
                        blank=True, help_text="Population in source boundary", null=True
                    ),
                ),
                (
                    "target_population",
                    models.PositiveIntegerField(
                        blank=True, help_text="Population in target boundary", null=True
                    ),
                ),
                (
                    "allocated_population",
                    models.PositiveIntegerField(
                        blank=True,
                        help_text="Population allocated via this relationship",
                        null=True,
                    ),
                ),
                (
                    "area_sq_meters",
                    models.BigIntegerField(
                        blank=True,
                        help_text="Area of intersection in square meters",
                        null=True,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "data_source",
                    models.CharField(
                        blank=True,
                        help_text="Source of this crosswalk data (e.g., Census Bureau file)",
                        max_length=100,
                    ),
                ),
            ],
            options={
                "verbose_name": "Temporal Crosswalk",
                "verbose_name_plural": "Temporal Crosswalks",
                "indexes": [
                    models.Index(
                        fields=["source_boundary_id", "source_vintage_year"],
                        name="siege_geo_t_source__9b52c3_idx",
                    ),
                    models.Index(
                        fields=["target_boundary_id", "target_vintage_year"],
                        name="siege_geo_t_target__433bf4_idx",
                    ),
                    models.Index(
                        fields=[
                            "source_type",
                            "source_vintage_year",
                            "target_vintage_year",
                        ],
                        name="siege_geo_t_source__6d08e8_idx",
                    ),
                    models.Index(
                        fields=["state_fips", "source_type"],
                        name="siege_geo_t_state_f_8bfc06_idx",
                    ),
                    models.Index(
                        fields=["relationship"], name="siege_geo_t_relatio_48beb5_idx"
                    ),
                ],
                "unique_together": {
                    (
                        "source_boundary_id",
                        "target_boundary_id",
                        "source_vintage_year",
                        "target_vintage_year",
                        "weight_type",
                    )
                },
            },
        ),
        migrations.CreateModel(
            name="Tract",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "feature_id",
                    models.CharField(
                        db_index=True,
                        help_text="Stable identifier for this feature (unique per vintage_year)",
                        max_length=60,
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Human-readable name of this feature", max_length=255
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Edition year of the source dataset",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "valid_from",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature became effective (NULL = always valid)",
                        null=True,
                    ),
                ),
                (
                    "valid_to",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature ceased to be effective (NULL = still valid)",
                        null=True,
                    ),
                ),
                (
                    "source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Provenance of this feature (e.g. TIGER/Line, GADM, OSM)",
                        max_length=50,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Boundary identifier (synced from feature_id)",
                        max_length=60,
                    ),
                ),
                (
                    "geometry",
                    django.contrib.gis.db.models.fields.MultiPolygonField(
                        help_text="Boundary geometry (WGS 84)", srid=4326
                    ),
                ),
                (
                    "area_land",
                    models.BigIntegerField(
                        blank=True, help_text="Land area in square meters", null=True
                    ),
                ),
                (
                    "area_water",
                    models.BigIntegerField(
                        blank=True, help_text="Water area in square meters", null=True
                    ),
                ),
                (
                    "internal_point",
                    django.contrib.gis.db.models.fields.PointField(
                        blank=True,
                        help_text="Representative interior point (INTPTLAT/INTPTLON)",
                        null=True,
                        srid=4326,
                    ),
                ),
                (
                    "geoid",
                    models.CharField(
                        db_index=True,
                        help_text="Full Census GEOID that uniquely identifies this geography",
                        max_length=20,
                    ),
                ),
                (
                    "state_fips",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="2-digit state FIPS code",
                        max_length=2,
                    ),
                ),
                (
                    "lsad",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Legal/Statistical Area Description code",
                        max_length=2,
                    ),
                ),
                (
                    "mtfcc",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="MAF/TIGER Feature Class Code",
                        max_length=5,
                    ),
                ),
                (
                    "funcstat",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Functional status code from TIGER/Line",
                        max_length=1,
                    ),
                ),
                (
                    "county_fips",
                    models.CharField(
                        db_index=True,
                        help_text="3-digit county FIPS code",
                        max_length=3,
                    ),
                ),
                (
                    "tract_code",
                    models.CharField(
                        db_index=True, help_text="6-digit tract code", max_length=6
                    ),
                ),
                (
                    "county",
                    models.ForeignKey(
                        help_text="Parent county",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="tracts",
                        to="siege_geo.county",
                    ),
                ),
                (
                    "state",
                    models.ForeignKey(
                        help_text="Parent state",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="tracts",
                        to="siege_geo.state",
                    ),
                ),
            ],
            options={
                "verbose_name": "Census Tract",
                "verbose_name_plural": "Census Tracts",
            },
        ),
        migrations.CreateModel(
            name="BlockGroup",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "feature_id",
                    models.CharField(
                        db_index=True,
                        help_text="Stable identifier for this feature (unique per vintage_year)",
                        max_length=60,
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Human-readable name of this feature", max_length=255
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Edition year of the source dataset",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "valid_from",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature became effective (NULL = always valid)",
                        null=True,
                    ),
                ),
                (
                    "valid_to",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature ceased to be effective (NULL = still valid)",
                        null=True,
                    ),
                ),
                (
                    "source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Provenance of this feature (e.g. TIGER/Line, GADM, OSM)",
                        max_length=50,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Boundary identifier (synced from feature_id)",
                        max_length=60,
                    ),
                ),
                (
                    "geometry",
                    django.contrib.gis.db.models.fields.MultiPolygonField(
                        help_text="Boundary geometry (WGS 84)", srid=4326
                    ),
                ),
                (
                    "area_land",
                    models.BigIntegerField(
                        blank=True, help_text="Land area in square meters", null=True
                    ),
                ),
                (
                    "area_water",
                    models.BigIntegerField(
                        blank=True, help_text="Water area in square meters", null=True
                    ),
                ),
                (
                    "internal_point",
                    django.contrib.gis.db.models.fields.PointField(
                        blank=True,
                        help_text="Representative interior point (INTPTLAT/INTPTLON)",
                        null=True,
                        srid=4326,
                    ),
                ),
                (
                    "geoid",
                    models.CharField(
                        db_index=True,
                        help_text="Full Census GEOID that uniquely identifies this geography",
                        max_length=20,
                    ),
                ),
                (
                    "state_fips",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="2-digit state FIPS code",
                        max_length=2,
                    ),
                ),
                (
                    "lsad",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Legal/Statistical Area Description code",
                        max_length=2,
                    ),
                ),
                (
                    "mtfcc",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="MAF/TIGER Feature Class Code",
                        max_length=5,
                    ),
                ),
                (
                    "funcstat",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Functional status code from TIGER/Line",
                        max_length=1,
                    ),
                ),
                (
                    "county_fips",
                    models.CharField(
                        db_index=True,
                        help_text="3-digit county FIPS code",
                        max_length=3,
                    ),
                ),
                (
                    "tract_code",
                    models.CharField(
                        db_index=True, help_text="6-digit tract code", max_length=6
                    ),
                ),
                (
                    "block_group",
                    models.CharField(
                        db_index=True,
                        help_text="1-digit block group number",
                        max_length=1,
                    ),
                ),
                (
                    "county",
                    models.ForeignKey(
                        help_text="Parent county",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="block_groups",
                        to="siege_geo.county",
                    ),
                ),
                (
                    "state",
                    models.ForeignKey(
                        help_text="Parent state",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="block_groups",
                        to="siege_geo.state",
                    ),
                ),
                (
                    "tract",
                    models.ForeignKey(
                        help_text="Parent tract",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="block_groups",
                        to="siege_geo.tract",
                    ),
                ),
            ],
            options={
                "verbose_name": "Block Group",
                "verbose_name_plural": "Block Groups",
            },
        ),
        migrations.CreateModel(
            name="Block",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "feature_id",
                    models.CharField(
                        db_index=True,
                        help_text="Stable identifier for this feature (unique per vintage_year)",
                        max_length=60,
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Human-readable name of this feature", max_length=255
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Edition year of the source dataset",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "valid_from",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature became effective (NULL = always valid)",
                        null=True,
                    ),
                ),
                (
                    "valid_to",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature ceased to be effective (NULL = still valid)",
                        null=True,
                    ),
                ),
                (
                    "source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Provenance of this feature (e.g. TIGER/Line, GADM, OSM)",
                        max_length=50,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Boundary identifier (synced from feature_id)",
                        max_length=60,
                    ),
                ),
                (
                    "geometry",
                    django.contrib.gis.db.models.fields.MultiPolygonField(
                        help_text="Boundary geometry (WGS 84)", srid=4326
                    ),
                ),
                (
                    "area_land",
                    models.BigIntegerField(
                        blank=True, help_text="Land area in square meters", null=True
                    ),
                ),
                (
                    "area_water",
                    models.BigIntegerField(
                        blank=True, help_text="Water area in square meters", null=True
                    ),
                ),
                (
                    "internal_point",
                    django.contrib.gis.db.models.fields.PointField(
                        blank=True,
                        help_text="Representative interior point (INTPTLAT/INTPTLON)",
                        null=True,
                        srid=4326,
                    ),
                ),
                (
                    "geoid",
                    models.CharField(
                        db_index=True,
                        help_text="Full Census GEOID that uniquely identifies this geography",
                        max_length=20,
                    ),
                ),
                (
                    "state_fips",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="2-digit state FIPS code",
                        max_length=2,
                    ),
                ),
                (
                    "lsad",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Legal/Statistical Area Description code",
                        max_length=2,
                    ),
                ),
                (
                    "mtfcc",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="MAF/TIGER Feature Class Code",
                        max_length=5,
                    ),
                ),
                (
                    "funcstat",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Functional status code from TIGER/Line",
                        max_length=1,
                    ),
                ),
                (
                    "county_fips",
                    models.CharField(
                        db_index=True,
                        help_text="3-digit county FIPS code",
                        max_length=3,
                    ),
                ),
                (
                    "tract_code",
                    models.CharField(
                        db_index=True, help_text="6-digit tract code", max_length=6
                    ),
                ),
                (
                    "block_code",
                    models.CharField(
                        db_index=True, help_text="4-digit block code", max_length=4
                    ),
                ),
                (
                    "block_group_ref",
                    models.ForeignKey(
                        help_text="Parent block group",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="blocks",
                        to="siege_geo.blockgroup",
                    ),
                ),
                (
                    "county",
                    models.ForeignKey(
                        help_text="Parent county",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="blocks",
                        to="siege_geo.county",
                    ),
                ),
                (
                    "state",
                    models.ForeignKey(
                        help_text="Parent state",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="blocks",
                        to="siege_geo.state",
                    ),
                ),
                (
                    "tract",
                    models.ForeignKey(
                        help_text="Parent tract",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="blocks",
                        to="siege_geo.tract",
                    ),
                ),
            ],
            options={
                "verbose_name": "Census Block",
                "verbose_name_plural": "Census Blocks",
            },
        ),
        migrations.CreateModel(
            name="TractCDIntersection",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True, help_text="Vintage year for both boundaries"
                    ),
                ),
                (
                    "intersection_area",
                    models.BigIntegerField(
                        blank=True,
                        help_text="Area of intersection in square meters",
                        null=True,
                    ),
                ),
                (
                    "pct_of_tract",
                    models.DecimalField(
                        blank=True,
                        decimal_places=6,
                        help_text="Fraction of tract area in intersection",
                        max_digits=7,
                        null=True,
                    ),
                ),
                (
                    "pct_of_cd",
                    models.DecimalField(
                        blank=True,
                        decimal_places=6,
                        help_text="Fraction of CD area in intersection",
                        max_digits=7,
                        null=True,
                    ),
                ),
                (
                    "is_dominant",
                    models.BooleanField(
                        db_index=True,
                        default=False,
                        help_text="True if this CD contains the most of this tract",
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                (
                    "congressional_district",
                    models.ForeignKey(
                        help_text="Congressional district boundary",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="tract_intersections",
                        to="siege_geo.congressionaldistrict",
                    ),
                ),
                (
                    "tract",
                    models.ForeignKey(
                        help_text="Tract boundary",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="cd_intersections",
                        to="siege_geo.tract",
                    ),
                ),
            ],
            options={
                "verbose_name": "Tract-CD Intersection",
                "verbose_name_plural": "Tract-CD Intersections",
            },
        ),
        migrations.CreateModel(
            name="UrbanArea",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "feature_id",
                    models.CharField(
                        db_index=True,
                        help_text="Stable identifier for this feature (unique per vintage_year)",
                        max_length=60,
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Human-readable name of this feature", max_length=255
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Edition year of the source dataset",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "valid_from",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature became effective (NULL = always valid)",
                        null=True,
                    ),
                ),
                (
                    "valid_to",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature ceased to be effective (NULL = still valid)",
                        null=True,
                    ),
                ),
                (
                    "source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Provenance of this feature (e.g. TIGER/Line, GADM, OSM)",
                        max_length=50,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Boundary identifier (synced from feature_id)",
                        max_length=60,
                    ),
                ),
                (
                    "geometry",
                    django.contrib.gis.db.models.fields.MultiPolygonField(
                        help_text="Boundary geometry (WGS 84)", srid=4326
                    ),
                ),
                (
                    "area_land",
                    models.BigIntegerField(
                        blank=True, help_text="Land area in square meters", null=True
                    ),
                ),
                (
                    "area_water",
                    models.BigIntegerField(
                        blank=True, help_text="Water area in square meters", null=True
                    ),
                ),
                (
                    "internal_point",
                    django.contrib.gis.db.models.fields.PointField(
                        blank=True,
                        help_text="Representative interior point (INTPTLAT/INTPTLON)",
                        null=True,
                        srid=4326,
                    ),
                ),
                (
                    "geoid",
                    models.CharField(
                        db_index=True,
                        help_text="Full Census GEOID that uniquely identifies this geography",
                        max_length=20,
                    ),
                ),
                (
                    "state_fips",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="2-digit state FIPS code",
                        max_length=2,
                    ),
                ),
                (
                    "lsad",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Legal/Statistical Area Description code",
                        max_length=2,
                    ),
                ),
                (
                    "mtfcc",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="MAF/TIGER Feature Class Code",
                        max_length=5,
                    ),
                ),
                (
                    "funcstat",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Functional status code from TIGER/Line",
                        max_length=1,
                    ),
                ),
                (
                    "ua_type",
                    models.CharField(
                        choices=[
                            ("UA", "Urbanized Area (50,000+)"),
                            ("UC", "Urban Cluster (2,500-49,999)"),
                        ],
                        db_index=True,
                        help_text="Urbanized Area or Urban Cluster",
                        max_length=2,
                    ),
                ),
            ],
            options={
                "verbose_name": "Urban Area",
                "verbose_name_plural": "Urban Areas",
                "indexes": [
                    models.Index(
                        fields=["ua_type"], name="siege_geo_u_ua_type_193e98_idx"
                    ),
                    models.Index(
                        fields=["vintage_year"], name="siege_geo_u_vintage_d29b3c_idx"
                    ),
                ],
                "unique_together": {("geoid", "vintage_year")},
            },
        ),
        migrations.CreateModel(
            name="VTD",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "feature_id",
                    models.CharField(
                        db_index=True,
                        help_text="Stable identifier for this feature (unique per vintage_year)",
                        max_length=60,
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Human-readable name of this feature", max_length=255
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Edition year of the source dataset",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "valid_from",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature became effective (NULL = always valid)",
                        null=True,
                    ),
                ),
                (
                    "valid_to",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature ceased to be effective (NULL = still valid)",
                        null=True,
                    ),
                ),
                (
                    "source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Provenance of this feature (e.g. TIGER/Line, GADM, OSM)",
                        max_length=50,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Boundary identifier (synced from feature_id)",
                        max_length=60,
                    ),
                ),
                (
                    "geometry",
                    django.contrib.gis.db.models.fields.MultiPolygonField(
                        help_text="Boundary geometry (WGS 84)", srid=4326
                    ),
                ),
                (
                    "area_land",
                    models.BigIntegerField(
                        blank=True, help_text="Land area in square meters", null=True
                    ),
                ),
                (
                    "area_water",
                    models.BigIntegerField(
                        blank=True, help_text="Water area in square meters", null=True
                    ),
                ),
                (
                    "internal_point",
                    django.contrib.gis.db.models.fields.PointField(
                        blank=True,
                        help_text="Representative interior point (INTPTLAT/INTPTLON)",
                        null=True,
                        srid=4326,
                    ),
                ),
                (
                    "geoid",
                    models.CharField(
                        db_index=True,
                        help_text="Full Census GEOID that uniquely identifies this geography",
                        max_length=20,
                    ),
                ),
                (
                    "state_fips",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="2-digit state FIPS code",
                        max_length=2,
                    ),
                ),
                (
                    "lsad",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Legal/Statistical Area Description code",
                        max_length=2,
                    ),
                ),
                (
                    "mtfcc",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="MAF/TIGER Feature Class Code",
                        max_length=5,
                    ),
                ),
                (
                    "funcstat",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Functional status code from TIGER/Line",
                        max_length=1,
                    ),
                ),
                (
                    "county_fips",
                    models.CharField(
                        db_index=True,
                        help_text="3-digit county FIPS code",
                        max_length=3,
                    ),
                ),
                (
                    "vtd_code",
                    models.CharField(
                        db_index=True,
                        help_text="VTD code (typically 3-6 characters)",
                        max_length=6,
                    ),
                ),
                (
                    "precinct_name",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Election precinct name (from election data, not Census)",
                        max_length=255,
                    ),
                ),
                (
                    "precinct_code",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="Election precinct code (from election data)",
                        max_length=20,
                    ),
                ),
                (
                    "registered_voters",
                    models.PositiveIntegerField(
                        blank=True,
                        help_text="Registered voter count (from election data)",
                        null=True,
                    ),
                ),
                (
                    "data_source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Source of non-Census fields (e.g. 'NC SBE 2024')",
                        max_length=100,
                    ),
                ),
                (
                    "congressional_district",
                    models.ForeignKey(
                        blank=True,
                        db_constraint=False,
                        help_text="Containing congressional district (soft FK, resolved post-load)",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="vtds",
                        to="siege_geo.congressionaldistrict",
                    ),
                ),
                (
                    "county",
                    models.ForeignKey(
                        help_text="Parent county",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="vtds",
                        to="siege_geo.county",
                    ),
                ),
                (
                    "state",
                    models.ForeignKey(
                        help_text="Parent state",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="vtds",
                        to="siege_geo.state",
                    ),
                ),
            ],
            options={
                "verbose_name": "Voting Tabulation District",
                "verbose_name_plural": "Voting Tabulation Districts",
            },
        ),
        migrations.CreateModel(
            name="VTDCDIntersection",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True, help_text="Vintage year for both boundaries"
                    ),
                ),
                (
                    "intersection_area",
                    models.BigIntegerField(
                        blank=True,
                        help_text="Area of intersection in square meters",
                        null=True,
                    ),
                ),
                (
                    "pct_of_vtd",
                    models.DecimalField(
                        blank=True,
                        decimal_places=6,
                        help_text="Fraction of VTD area in intersection",
                        max_digits=7,
                        null=True,
                    ),
                ),
                (
                    "pct_of_cd",
                    models.DecimalField(
                        blank=True,
                        decimal_places=6,
                        help_text="Fraction of CD area in intersection",
                        max_digits=7,
                        null=True,
                    ),
                ),
                (
                    "is_dominant",
                    models.BooleanField(
                        db_index=True,
                        default=False,
                        help_text="True if this CD contains the most of this VTD",
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                (
                    "congressional_district",
                    models.ForeignKey(
                        help_text="Congressional district boundary",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="vtd_intersections",
                        to="siege_geo.congressionaldistrict",
                    ),
                ),
                (
                    "vtd",
                    models.ForeignKey(
                        help_text="VTD boundary",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="cd_intersections",
                        to="siege_geo.vtd",
                    ),
                ),
            ],
            options={
                "verbose_name": "VTD-CD Intersection",
                "verbose_name_plural": "VTD-CD Intersections",
            },
        ),
        migrations.CreateModel(
            name="ZCTA",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "feature_id",
                    models.CharField(
                        db_index=True,
                        help_text="Stable identifier for this feature (unique per vintage_year)",
                        max_length=60,
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Human-readable name of this feature", max_length=255
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Edition year of the source dataset",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "valid_from",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature became effective (NULL = always valid)",
                        null=True,
                    ),
                ),
                (
                    "valid_to",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature ceased to be effective (NULL = still valid)",
                        null=True,
                    ),
                ),
                (
                    "source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Provenance of this feature (e.g. TIGER/Line, GADM, OSM)",
                        max_length=50,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Boundary identifier (synced from feature_id)",
                        max_length=60,
                    ),
                ),
                (
                    "geometry",
                    django.contrib.gis.db.models.fields.MultiPolygonField(
                        help_text="Boundary geometry (WGS 84)", srid=4326
                    ),
                ),
                (
                    "area_land",
                    models.BigIntegerField(
                        blank=True, help_text="Land area in square meters", null=True
                    ),
                ),
                (
                    "area_water",
                    models.BigIntegerField(
                        blank=True, help_text="Water area in square meters", null=True
                    ),
                ),
                (
                    "internal_point",
                    django.contrib.gis.db.models.fields.PointField(
                        blank=True,
                        help_text="Representative interior point (INTPTLAT/INTPTLON)",
                        null=True,
                        srid=4326,
                    ),
                ),
                (
                    "geoid",
                    models.CharField(
                        db_index=True,
                        help_text="Full Census GEOID that uniquely identifies this geography",
                        max_length=20,
                    ),
                ),
                (
                    "state_fips",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="2-digit state FIPS code",
                        max_length=2,
                    ),
                ),
                (
                    "lsad",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Legal/Statistical Area Description code",
                        max_length=2,
                    ),
                ),
                (
                    "mtfcc",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="MAF/TIGER Feature Class Code",
                        max_length=5,
                    ),
                ),
                (
                    "funcstat",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Functional status code from TIGER/Line",
                        max_length=1,
                    ),
                ),
                (
                    "zcta5",
                    models.CharField(
                        db_index=True, help_text="5-digit ZCTA code", max_length=5
                    ),
                ),
            ],
            options={
                "verbose_name": "ZCTA",
                "verbose_name_plural": "ZCTAs",
                "indexes": [
                    models.Index(fields=["zcta5"], name="siege_geo_z_zcta5_bd3d1b_idx"),
                    models.Index(
                        fields=["vintage_year"], name="siege_geo_z_vintage_15772f_idx"
                    ),
                ],
                "unique_together": {("geoid", "vintage_year")},
            },
        ),
        migrations.CreateModel(
            name="CountyCDIntersection",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True, help_text="Vintage year for both boundaries"
                    ),
                ),
                (
                    "intersection_area",
                    models.BigIntegerField(
                        blank=True,
                        help_text="Area of intersection in square meters",
                        null=True,
                    ),
                ),
                (
                    "pct_of_county",
                    models.DecimalField(
                        blank=True,
                        decimal_places=6,
                        help_text="Fraction of county area in intersection",
                        max_digits=7,
                        null=True,
                    ),
                ),
                (
                    "pct_of_cd",
                    models.DecimalField(
                        blank=True,
                        decimal_places=6,
                        help_text="Fraction of CD area in intersection",
                        max_digits=7,
                        null=True,
                    ),
                ),
                (
                    "is_dominant",
                    models.BooleanField(
                        db_index=True,
                        default=False,
                        help_text="True if this CD contains the most of this county",
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                (
                    "congressional_district",
                    models.ForeignKey(
                        help_text="Congressional district boundary",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="county_intersections",
                        to="siege_geo.congressionaldistrict",
                    ),
                ),
                (
                    "county",
                    models.ForeignKey(
                        help_text="County boundary",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="cd_intersections",
                        to="siege_geo.county",
                    ),
                ),
            ],
            options={
                "verbose_name": "County-CD Intersection",
                "verbose_name_plural": "County-CD Intersections",
                "indexes": [
                    models.Index(
                        fields=["vintage_year"], name="siege_geo_c_vintage_3e9081_idx"
                    )
                ],
                "unique_together": {
                    ("county", "congressional_district", "vintage_year")
                },
            },
        ),
        migrations.CreateModel(
            name="DemographicSnapshot",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "object_id",
                    models.CharField(help_text="GEOID of the boundary", max_length=20),
                ),
                (
                    "year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Census/ACS year for this data",
                        validators=[
                            django.core.validators.MinValueValidator(1990),
                            django.core.validators.MaxValueValidator(2050),
                        ],
                    ),
                ),
                (
                    "dataset",
                    models.CharField(
                        choices=[
                            ("acs5", "American Community Survey 5-Year"),
                            ("acs1", "American Community Survey 1-Year"),
                            ("dec", "Decennial Census"),
                            ("dec_pl", "Decennial Census P.L. 94-171"),
                        ],
                        db_index=True,
                        help_text="Census dataset source",
                        max_length=10,
                    ),
                ),
                (
                    "vintage",
                    models.PositiveSmallIntegerField(
                        blank=True,
                        help_text="API vintage year (may differ from data year)",
                        null=True,
                    ),
                ),
                (
                    "values",
                    models.JSONField(
                        default=dict, help_text="Variable code -> value mapping"
                    ),
                ),
                (
                    "moe_values",
                    models.JSONField(
                        blank=True,
                        default=dict,
                        help_text="Variable code -> margin of error mapping",
                    ),
                ),
                (
                    "total_population",
                    models.PositiveIntegerField(
                        blank=True,
                        db_index=True,
                        help_text="Total population (B01001_001E)",
                        null=True,
                    ),
                ),
                (
                    "median_household_income",
                    models.PositiveIntegerField(
                        blank=True,
                        help_text="Median household income (B19013_001E)",
                        null=True,
                    ),
                ),
                (
                    "median_age",
                    models.DecimalField(
                        blank=True,
                        decimal_places=1,
                        help_text="Median age (B01002_001E)",
                        max_digits=4,
                        null=True,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "source_url",
                    models.URLField(
                        blank=True,
                        help_text="URL of the Census API call that provided this data",
                    ),
                ),
                (
                    "content_type",
                    models.ForeignKey(
                        help_text="Type of boundary this snapshot is for",
                        limit_choices_to={
                            "app_label": "siege_geo",
                            "model__in": [
                                "state",
                                "county",
                                "tract",
                                "blockgroup",
                                "block",
                                "place",
                                "zcta",
                                "congressionaldistrict",
                                "statelegislativeupper",
                                "statelegislativelower",
                                "vtd",
                                "precinct",
                                "cbsa",
                                "urbanarea",
                                "schooldistrictelementary",
                                "schooldistrictsecondary",
                                "schooldistrictunified",
                                "gadmcountry",
                                "gadmadmin1",
                                "gadmadmin2",
                                "gadmadmin3",
                                "gadmadmin4",
                                "gadmadmin5",
                                "nlrbregion",
                                "federaljudicialdistrict",
                            ],
                        },
                        on_delete=django.db.models.deletion.CASCADE,
                        to="contenttypes.contenttype",
                    ),
                ),
            ],
            options={
                "verbose_name": "Demographic Snapshot",
                "verbose_name_plural": "Demographic Snapshots",
                "indexes": [
                    models.Index(
                        fields=["content_type", "object_id"],
                        name="siege_geo_d_content_27d1fa_idx",
                    ),
                    models.Index(
                        fields=["year", "dataset"], name="siege_geo_d_year_ed86d5_idx"
                    ),
                    models.Index(
                        fields=["total_population"],
                        name="siege_geo_d_total_p_5b6f36_idx",
                    ),
                ],
                "unique_together": {("content_type", "object_id", "year", "dataset")},
            },
        ),
        migrations.CreateModel(
            name="DemographicTimeSeries",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "object_id",
                    models.CharField(help_text="GEOID of the boundary", max_length=20),
                ),
                (
                    "variable_code",
                    models.CharField(
                        db_index=True, help_text="Census variable code", max_length=20
                    ),
                ),
                (
                    "dataset",
                    models.CharField(
                        db_index=True, help_text="Census dataset", max_length=10
                    ),
                ),
                (
                    "start_year",
                    models.PositiveSmallIntegerField(help_text="First year in series"),
                ),
                (
                    "end_year",
                    models.PositiveSmallIntegerField(help_text="Last year in series"),
                ),
                ("years", models.JSONField(help_text="List of years")),
                (
                    "values",
                    models.JSONField(help_text="List of values corresponding to years"),
                ),
                (
                    "moe_values",
                    models.JSONField(
                        blank=True, default=list, help_text="List of MOE values"
                    ),
                ),
                (
                    "mean_value",
                    models.FloatField(
                        blank=True, help_text="Mean value across all years", null=True
                    ),
                ),
                (
                    "std_dev",
                    models.FloatField(
                        blank=True, help_text="Standard deviation", null=True
                    ),
                ),
                (
                    "cagr",
                    models.FloatField(
                        blank=True, help_text="Compound annual growth rate", null=True
                    ),
                ),
                (
                    "trend_direction",
                    models.CharField(
                        blank=True,
                        help_text="Trend direction (increasing, decreasing, stable)",
                        max_length=20,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "content_type",
                    models.ForeignKey(
                        help_text="Type of boundary",
                        on_delete=django.db.models.deletion.CASCADE,
                        to="contenttypes.contenttype",
                    ),
                ),
            ],
            options={
                "verbose_name": "Demographic Time Series",
                "verbose_name_plural": "Demographic Time Series",
                "indexes": [
                    models.Index(
                        fields=["content_type", "object_id"],
                        name="siege_geo_d_content_2d5f93_idx",
                    ),
                    models.Index(
                        fields=["variable_code", "dataset"],
                        name="siege_geo_d_variabl_82090f_idx",
                    ),
                ],
                "unique_together": {
                    (
                        "content_type",
                        "object_id",
                        "variable_code",
                        "dataset",
                        "start_year",
                        "end_year",
                    )
                },
            },
        ),
        migrations.CreateModel(
            name="GADMAdmin5",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "feature_id",
                    models.CharField(
                        db_index=True,
                        help_text="Stable identifier for this feature (unique per vintage_year)",
                        max_length=60,
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Human-readable name of this feature", max_length=255
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Edition year of the source dataset",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "valid_from",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature became effective (NULL = always valid)",
                        null=True,
                    ),
                ),
                (
                    "valid_to",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature ceased to be effective (NULL = still valid)",
                        null=True,
                    ),
                ),
                (
                    "source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Provenance of this feature (e.g. TIGER/Line, GADM, OSM)",
                        max_length=50,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Boundary identifier (synced from feature_id)",
                        max_length=60,
                    ),
                ),
                (
                    "geometry",
                    django.contrib.gis.db.models.fields.MultiPolygonField(
                        help_text="Boundary geometry (WGS 84)", srid=4326
                    ),
                ),
                (
                    "area_land",
                    models.BigIntegerField(
                        blank=True, help_text="Land area in square meters", null=True
                    ),
                ),
                (
                    "area_water",
                    models.BigIntegerField(
                        blank=True, help_text="Water area in square meters", null=True
                    ),
                ),
                (
                    "internal_point",
                    django.contrib.gis.db.models.fields.PointField(
                        blank=True,
                        help_text="Representative interior point (INTPTLAT/INTPTLON)",
                        null=True,
                        srid=4326,
                    ),
                ),
                (
                    "gid",
                    models.CharField(
                        db_index=True,
                        help_text="GADM identifier (e.g. 'USA', 'USA.5_1')",
                        max_length=50,
                    ),
                ),
                (
                    "gid_4_string",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="GID_4 string for parallel loading",
                        max_length=50,
                    ),
                ),
                (
                    "type_5",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Administrative type",
                        max_length=50,
                    ),
                ),
                (
                    "engtype_5",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="English type name",
                        max_length=50,
                    ),
                ),
                (
                    "admin4",
                    models.ForeignKey(
                        help_text="Parent admin4",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="admin5s",
                        to="siege_geo.gadmadmin4",
                    ),
                ),
            ],
            options={
                "verbose_name": "GADM Admin Level 5",
                "verbose_name_plural": "GADM Admin Level 5",
                "unique_together": {("gid", "vintage_year")},
            },
        ),
        migrations.AlterUniqueTogether(
            name="gadmadmin1",
            unique_together={("gid", "vintage_year")},
        ),
        migrations.CreateModel(
            name="SchoolDistrictUnified",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "feature_id",
                    models.CharField(
                        db_index=True,
                        help_text="Stable identifier for this feature (unique per vintage_year)",
                        max_length=60,
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Human-readable name of this feature", max_length=255
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Edition year of the source dataset",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "valid_from",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature became effective (NULL = always valid)",
                        null=True,
                    ),
                ),
                (
                    "valid_to",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature ceased to be effective (NULL = still valid)",
                        null=True,
                    ),
                ),
                (
                    "source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Provenance of this feature (e.g. TIGER/Line, GADM, OSM)",
                        max_length=50,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Boundary identifier (synced from feature_id)",
                        max_length=60,
                    ),
                ),
                (
                    "geometry",
                    django.contrib.gis.db.models.fields.MultiPolygonField(
                        help_text="Boundary geometry (WGS 84)", srid=4326
                    ),
                ),
                (
                    "area_land",
                    models.BigIntegerField(
                        blank=True, help_text="Land area in square meters", null=True
                    ),
                ),
                (
                    "area_water",
                    models.BigIntegerField(
                        blank=True, help_text="Water area in square meters", null=True
                    ),
                ),
                (
                    "internal_point",
                    django.contrib.gis.db.models.fields.PointField(
                        blank=True,
                        help_text="Representative interior point (INTPTLAT/INTPTLON)",
                        null=True,
                        srid=4326,
                    ),
                ),
                (
                    "geoid",
                    models.CharField(
                        db_index=True,
                        help_text="Full Census GEOID that uniquely identifies this geography",
                        max_length=20,
                    ),
                ),
                (
                    "state_fips",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="2-digit state FIPS code",
                        max_length=2,
                    ),
                ),
                (
                    "lsad",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Legal/Statistical Area Description code",
                        max_length=2,
                    ),
                ),
                (
                    "mtfcc",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="MAF/TIGER Feature Class Code",
                        max_length=5,
                    ),
                ),
                (
                    "funcstat",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Functional status code from TIGER/Line",
                        max_length=1,
                    ),
                ),
                (
                    "lea_id",
                    models.CharField(
                        db_index=True,
                        help_text="NCES Local Education Agency ID",
                        max_length=7,
                    ),
                ),
                (
                    "district_type",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="District type code (e.g. 00=unified, 01=elementary, 02=secondary)",
                        max_length=2,
                    ),
                ),
                (
                    "locale_code",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="NCES 2-digit locale code (11-43)",
                        max_length=2,
                    ),
                ),
                (
                    "locale_category",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Locale category (City, Suburb, Town, Rural)",
                        max_length=20,
                    ),
                ),
                (
                    "locale_subcategory",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Locale subcategory (Large, Midsize, Small, Fringe, Distant, Remote)",
                        max_length=20,
                    ),
                ),
                (
                    "state",
                    models.ForeignKey(
                        help_text="Parent state",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="%(class)s_districts",
                        to="siege_geo.state",
                    ),
                ),
            ],
            options={
                "verbose_name": "School District (Unified)",
                "verbose_name_plural": "School Districts (Unified)",
                "indexes": [
                    models.Index(
                        fields=["state_fips", "vintage_year"],
                        name="siege_geo_s_state_f_efe7ae_idx",
                    ),
                    models.Index(
                        fields=["lea_id"], name="siege_geo_s_lea_id_7995e7_idx"
                    ),
                    models.Index(
                        fields=["locale_code"], name="siege_geo_s_locale__b33770_idx"
                    ),
                ],
                "unique_together": {("geoid", "vintage_year")},
            },
        ),
        migrations.CreateModel(
            name="SchoolDistrictSecondary",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "feature_id",
                    models.CharField(
                        db_index=True,
                        help_text="Stable identifier for this feature (unique per vintage_year)",
                        max_length=60,
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Human-readable name of this feature", max_length=255
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Edition year of the source dataset",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "valid_from",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature became effective (NULL = always valid)",
                        null=True,
                    ),
                ),
                (
                    "valid_to",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature ceased to be effective (NULL = still valid)",
                        null=True,
                    ),
                ),
                (
                    "source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Provenance of this feature (e.g. TIGER/Line, GADM, OSM)",
                        max_length=50,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Boundary identifier (synced from feature_id)",
                        max_length=60,
                    ),
                ),
                (
                    "geometry",
                    django.contrib.gis.db.models.fields.MultiPolygonField(
                        help_text="Boundary geometry (WGS 84)", srid=4326
                    ),
                ),
                (
                    "area_land",
                    models.BigIntegerField(
                        blank=True, help_text="Land area in square meters", null=True
                    ),
                ),
                (
                    "area_water",
                    models.BigIntegerField(
                        blank=True, help_text="Water area in square meters", null=True
                    ),
                ),
                (
                    "internal_point",
                    django.contrib.gis.db.models.fields.PointField(
                        blank=True,
                        help_text="Representative interior point (INTPTLAT/INTPTLON)",
                        null=True,
                        srid=4326,
                    ),
                ),
                (
                    "geoid",
                    models.CharField(
                        db_index=True,
                        help_text="Full Census GEOID that uniquely identifies this geography",
                        max_length=20,
                    ),
                ),
                (
                    "state_fips",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="2-digit state FIPS code",
                        max_length=2,
                    ),
                ),
                (
                    "lsad",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Legal/Statistical Area Description code",
                        max_length=2,
                    ),
                ),
                (
                    "mtfcc",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="MAF/TIGER Feature Class Code",
                        max_length=5,
                    ),
                ),
                (
                    "funcstat",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Functional status code from TIGER/Line",
                        max_length=1,
                    ),
                ),
                (
                    "lea_id",
                    models.CharField(
                        db_index=True,
                        help_text="NCES Local Education Agency ID",
                        max_length=7,
                    ),
                ),
                (
                    "district_type",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="District type code (e.g. 00=unified, 01=elementary, 02=secondary)",
                        max_length=2,
                    ),
                ),
                (
                    "locale_code",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="NCES 2-digit locale code (11-43)",
                        max_length=2,
                    ),
                ),
                (
                    "locale_category",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Locale category (City, Suburb, Town, Rural)",
                        max_length=20,
                    ),
                ),
                (
                    "locale_subcategory",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Locale subcategory (Large, Midsize, Small, Fringe, Distant, Remote)",
                        max_length=20,
                    ),
                ),
                (
                    "state",
                    models.ForeignKey(
                        help_text="Parent state",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="%(class)s_districts",
                        to="siege_geo.state",
                    ),
                ),
            ],
            options={
                "verbose_name": "School District (Secondary)",
                "verbose_name_plural": "School Districts (Secondary)",
                "indexes": [
                    models.Index(
                        fields=["state_fips", "vintage_year"],
                        name="siege_geo_s_state_f_3fad46_idx",
                    ),
                    models.Index(
                        fields=["lea_id"], name="siege_geo_s_lea_id_aaa9b8_idx"
                    ),
                    models.Index(
                        fields=["locale_code"], name="siege_geo_s_locale__2a0049_idx"
                    ),
                ],
                "unique_together": {("geoid", "vintage_year")},
            },
        ),
        migrations.CreateModel(
            name="SchoolDistrictElementary",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "feature_id",
                    models.CharField(
                        db_index=True,
                        help_text="Stable identifier for this feature (unique per vintage_year)",
                        max_length=60,
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Human-readable name of this feature", max_length=255
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Edition year of the source dataset",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "valid_from",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature became effective (NULL = always valid)",
                        null=True,
                    ),
                ),
                (
                    "valid_to",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature ceased to be effective (NULL = still valid)",
                        null=True,
                    ),
                ),
                (
                    "source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Provenance of this feature (e.g. TIGER/Line, GADM, OSM)",
                        max_length=50,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Boundary identifier (synced from feature_id)",
                        max_length=60,
                    ),
                ),
                (
                    "geometry",
                    django.contrib.gis.db.models.fields.MultiPolygonField(
                        help_text="Boundary geometry (WGS 84)", srid=4326
                    ),
                ),
                (
                    "area_land",
                    models.BigIntegerField(
                        blank=True, help_text="Land area in square meters", null=True
                    ),
                ),
                (
                    "area_water",
                    models.BigIntegerField(
                        blank=True, help_text="Water area in square meters", null=True
                    ),
                ),
                (
                    "internal_point",
                    django.contrib.gis.db.models.fields.PointField(
                        blank=True,
                        help_text="Representative interior point (INTPTLAT/INTPTLON)",
                        null=True,
                        srid=4326,
                    ),
                ),
                (
                    "geoid",
                    models.CharField(
                        db_index=True,
                        help_text="Full Census GEOID that uniquely identifies this geography",
                        max_length=20,
                    ),
                ),
                (
                    "state_fips",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="2-digit state FIPS code",
                        max_length=2,
                    ),
                ),
                (
                    "lsad",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Legal/Statistical Area Description code",
                        max_length=2,
                    ),
                ),
                (
                    "mtfcc",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="MAF/TIGER Feature Class Code",
                        max_length=5,
                    ),
                ),
                (
                    "funcstat",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Functional status code from TIGER/Line",
                        max_length=1,
                    ),
                ),
                (
                    "lea_id",
                    models.CharField(
                        db_index=True,
                        help_text="NCES Local Education Agency ID",
                        max_length=7,
                    ),
                ),
                (
                    "district_type",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="District type code (e.g. 00=unified, 01=elementary, 02=secondary)",
                        max_length=2,
                    ),
                ),
                (
                    "locale_code",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="NCES 2-digit locale code (11-43)",
                        max_length=2,
                    ),
                ),
                (
                    "locale_category",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Locale category (City, Suburb, Town, Rural)",
                        max_length=20,
                    ),
                ),
                (
                    "locale_subcategory",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Locale subcategory (Large, Midsize, Small, Fringe, Distant, Remote)",
                        max_length=20,
                    ),
                ),
                (
                    "state",
                    models.ForeignKey(
                        help_text="Parent state",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="%(class)s_districts",
                        to="siege_geo.state",
                    ),
                ),
            ],
            options={
                "verbose_name": "School District (Elementary)",
                "verbose_name_plural": "School Districts (Elementary)",
                "indexes": [
                    models.Index(
                        fields=["state_fips", "vintage_year"],
                        name="siege_geo_s_state_f_6a368b_idx",
                    ),
                    models.Index(
                        fields=["lea_id"], name="siege_geo_s_lea_id_4ee216_idx"
                    ),
                    models.Index(
                        fields=["locale_code"], name="siege_geo_s_locale__71de4c_idx"
                    ),
                ],
                "unique_together": {("geoid", "vintage_year")},
            },
        ),
        migrations.CreateModel(
            name="Precinct",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "feature_id",
                    models.CharField(
                        db_index=True,
                        help_text="Stable identifier for this feature (unique per vintage_year)",
                        max_length=60,
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Human-readable name of this feature", max_length=255
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Edition year of the source dataset",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "valid_from",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature became effective (NULL = always valid)",
                        null=True,
                    ),
                ),
                (
                    "valid_to",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature ceased to be effective (NULL = still valid)",
                        null=True,
                    ),
                ),
                (
                    "source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Provenance of this feature (e.g. TIGER/Line, GADM, OSM)",
                        max_length=50,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Boundary identifier (synced from feature_id)",
                        max_length=60,
                    ),
                ),
                (
                    "geometry",
                    django.contrib.gis.db.models.fields.MultiPolygonField(
                        help_text="Boundary geometry (WGS 84)", srid=4326
                    ),
                ),
                (
                    "area_land",
                    models.BigIntegerField(
                        blank=True, help_text="Land area in square meters", null=True
                    ),
                ),
                (
                    "area_water",
                    models.BigIntegerField(
                        blank=True, help_text="Water area in square meters", null=True
                    ),
                ),
                (
                    "internal_point",
                    django.contrib.gis.db.models.fields.PointField(
                        blank=True,
                        help_text="Representative interior point (INTPTLAT/INTPTLON)",
                        null=True,
                        srid=4326,
                    ),
                ),
                (
                    "geoid",
                    models.CharField(
                        db_index=True,
                        help_text="Full Census GEOID that uniquely identifies this geography",
                        max_length=20,
                    ),
                ),
                (
                    "state_fips",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="2-digit state FIPS code",
                        max_length=2,
                    ),
                ),
                (
                    "lsad",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Legal/Statistical Area Description code",
                        max_length=2,
                    ),
                ),
                (
                    "mtfcc",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="MAF/TIGER Feature Class Code",
                        max_length=5,
                    ),
                ),
                (
                    "funcstat",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Functional status code from TIGER/Line",
                        max_length=1,
                    ),
                ),
                (
                    "county_fips",
                    models.CharField(
                        db_index=True,
                        help_text="3-digit county FIPS code",
                        max_length=3,
                    ),
                ),
                (
                    "precinct_code",
                    models.CharField(
                        db_index=True,
                        help_text="Precinct identifier (format varies by state)",
                        max_length=20,
                    ),
                ),
                (
                    "precinct_name",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Human-readable precinct name",
                        max_length=255,
                    ),
                ),
                (
                    "precinct_source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Data source for this precinct boundary",
                        max_length=100,
                    ),
                ),
                (
                    "county",
                    models.ForeignKey(
                        help_text="Parent county",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="precincts",
                        to="siege_geo.county",
                    ),
                ),
                (
                    "state",
                    models.ForeignKey(
                        help_text="Parent state",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="precincts",
                        to="siege_geo.state",
                    ),
                ),
            ],
            options={
                "verbose_name": "Precinct",
                "verbose_name_plural": "Precincts",
                "indexes": [
                    models.Index(
                        fields=["state_fips", "county_fips"],
                        name="siege_geo_p_state_f_6d0336_idx",
                    ),
                    models.Index(
                        fields=["state_fips", "vintage_year"],
                        name="siege_geo_p_state_f_cd6a71_idx",
                    ),
                    models.Index(
                        fields=["precinct_code"], name="siege_geo_p_precinc_89a343_idx"
                    ),
                ],
                "unique_together": {("geoid", "vintage_year")},
            },
        ),
        migrations.CreateModel(
            name="Place",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "feature_id",
                    models.CharField(
                        db_index=True,
                        help_text="Stable identifier for this feature (unique per vintage_year)",
                        max_length=60,
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Human-readable name of this feature", max_length=255
                    ),
                ),
                (
                    "vintage_year",
                    models.PositiveSmallIntegerField(
                        db_index=True,
                        help_text="Edition year of the source dataset",
                        validators=[
                            django.core.validators.MinValueValidator(1790),
                            django.core.validators.MaxValueValidator(2100),
                        ],
                    ),
                ),
                (
                    "valid_from",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature became effective (NULL = always valid)",
                        null=True,
                    ),
                ),
                (
                    "valid_to",
                    models.DateField(
                        blank=True,
                        help_text="Date this feature ceased to be effective (NULL = still valid)",
                        null=True,
                    ),
                ),
                (
                    "source",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Provenance of this feature (e.g. TIGER/Line, GADM, OSM)",
                        max_length=50,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "boundary_id",
                    models.CharField(
                        db_index=True,
                        help_text="Boundary identifier (synced from feature_id)",
                        max_length=60,
                    ),
                ),
                (
                    "geometry",
                    django.contrib.gis.db.models.fields.MultiPolygonField(
                        help_text="Boundary geometry (WGS 84)", srid=4326
                    ),
                ),
                (
                    "area_land",
                    models.BigIntegerField(
                        blank=True, help_text="Land area in square meters", null=True
                    ),
                ),
                (
                    "area_water",
                    models.BigIntegerField(
                        blank=True, help_text="Water area in square meters", null=True
                    ),
                ),
                (
                    "internal_point",
                    django.contrib.gis.db.models.fields.PointField(
                        blank=True,
                        help_text="Representative interior point (INTPTLAT/INTPTLON)",
                        null=True,
                        srid=4326,
                    ),
                ),
                (
                    "geoid",
                    models.CharField(
                        db_index=True,
                        help_text="Full Census GEOID that uniquely identifies this geography",
                        max_length=20,
                    ),
                ),
                (
                    "state_fips",
                    models.CharField(
                        blank=True,
                        db_index=True,
                        default="",
                        help_text="2-digit state FIPS code",
                        max_length=2,
                    ),
                ),
                (
                    "lsad",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Legal/Statistical Area Description code",
                        max_length=2,
                    ),
                ),
                (
                    "mtfcc",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="MAF/TIGER Feature Class Code",
                        max_length=5,
                    ),
                ),
                (
                    "funcstat",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Functional status code from TIGER/Line",
                        max_length=1,
                    ),
                ),
                (
                    "place_fips",
                    models.CharField(
                        db_index=True, help_text="5-digit place FIPS code", max_length=5
                    ),
                ),
                (
                    "place_type",
                    models.CharField(
                        blank=True,
                        help_text="Place type code (e.g., C1=incorporated place)",
                        max_length=2,
                    ),
                ),
                (
                    "state",
                    models.ForeignKey(
                        help_text="Parent state",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="places",
                        to="siege_geo.state",
                    ),
                ),
            ],
            options={
                "verbose_name": "Place",
                "verbose_name_plural": "Places",
                "indexes": [
                    models.Index(
                        fields=["state_fips", "place_fips"],
                        name="siege_geo_p_state_f_c49e6d_idx",
                    ),
                    models.Index(
                        fields=["state_fips", "vintage_year"],
                        name="siege_geo_p_state_f_6ae64f_idx",
                    ),
                ],
                "unique_together": {("geoid", "vintage_year")},
            },
        ),
        migrations.AddIndex(
            model_name="county",
            index=models.Index(
                fields=["state_fips", "county_fips"],
                name="siege_geo_c_state_f_e6c90e_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="county",
            index=models.Index(
                fields=["state_fips", "vintage_year"],
                name="siege_geo_c_state_f_0f5037_idx",
            ),
        ),
        migrations.AlterUniqueTogether(
            name="county",
            unique_together={("geoid", "vintage_year")},
        ),
        migrations.AddIndex(
            model_name="congressionaldistrict",
            index=models.Index(
                fields=["state_fips", "district_number"],
                name="siege_geo_c_state_f_a6c3e0_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="congressionaldistrict",
            index=models.Index(
                fields=["state_fips", "vintage_year"],
                name="siege_geo_c_state_f_3d653f_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="congressionaldistrict",
            index=models.Index(
                fields=["congress_number"], name="siege_geo_c_congres_57e541_idx"
            ),
        ),
        migrations.AlterUniqueTogether(
            name="congressionaldistrict",
            unique_together={("geoid", "vintage_year")},
        ),
        migrations.AddIndex(
            model_name="statelegislativelower",
            index=models.Index(
                fields=["state_fips", "district_number"],
                name="siege_geo_s_state_f_c4d525_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="statelegislativelower",
            index=models.Index(
                fields=["state_fips", "vintage_year"],
                name="siege_geo_s_state_f_a3cab6_idx",
            ),
        ),
        migrations.AlterUniqueTogether(
            name="statelegislativelower",
            unique_together={("geoid", "vintage_year")},
        ),
        migrations.AddIndex(
            model_name="statelegislativeupper",
            index=models.Index(
                fields=["state_fips", "district_number"],
                name="siege_geo_s_state_f_534f1b_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="statelegislativeupper",
            index=models.Index(
                fields=["state_fips", "vintage_year"],
                name="siege_geo_s_state_f_10cd2c_idx",
            ),
        ),
        migrations.AlterUniqueTogether(
            name="statelegislativeupper",
            unique_together={("geoid", "vintage_year")},
        ),
        migrations.AddIndex(
            model_name="tract",
            index=models.Index(
                fields=["state_fips", "county_fips", "tract_code"],
                name="siege_geo_t_state_f_d5f9d5_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="tract",
            index=models.Index(
                fields=["state_fips", "vintage_year"],
                name="siege_geo_t_state_f_300cdc_idx",
            ),
        ),
        migrations.AlterUniqueTogether(
            name="tract",
            unique_together={("geoid", "vintage_year")},
        ),
        migrations.AddIndex(
            model_name="blockgroup",
            index=models.Index(
                fields=["state_fips", "county_fips", "tract_code"],
                name="siege_geo_b_state_f_ffaeae_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="blockgroup",
            index=models.Index(
                fields=["state_fips", "vintage_year"],
                name="siege_geo_b_state_f_072467_idx",
            ),
        ),
        migrations.AlterUniqueTogether(
            name="blockgroup",
            unique_together={("geoid", "vintage_year")},
        ),
        migrations.AddIndex(
            model_name="block",
            index=models.Index(
                fields=["state_fips", "county_fips", "tract_code"],
                name="siege_geo_b_state_f_5861c8_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="block",
            index=models.Index(
                fields=["state_fips", "vintage_year"],
                name="siege_geo_b_state_f_0b932a_idx",
            ),
        ),
        migrations.AlterUniqueTogether(
            name="block",
            unique_together={("geoid", "vintage_year")},
        ),
        migrations.AddIndex(
            model_name="tractcdintersection",
            index=models.Index(
                fields=["vintage_year"], name="siege_geo_t_vintage_67f5ae_idx"
            ),
        ),
        migrations.AlterUniqueTogether(
            name="tractcdintersection",
            unique_together={("tract", "congressional_district", "vintage_year")},
        ),
        migrations.AddIndex(
            model_name="vtd",
            index=models.Index(
                fields=["state_fips", "county_fips", "vtd_code"],
                name="siege_geo_v_state_f_dbbcf0_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="vtd",
            index=models.Index(
                fields=["state_fips", "vintage_year"],
                name="siege_geo_v_state_f_f0730f_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="vtd",
            index=models.Index(
                fields=["precinct_code"], name="siege_geo_v_precinc_4164a1_idx"
            ),
        ),
        migrations.AlterUniqueTogether(
            name="vtd",
            unique_together={("geoid", "vintage_year")},
        ),
        migrations.AddIndex(
            model_name="vtdcdintersection",
            index=models.Index(
                fields=["vintage_year"], name="siege_geo_v_vintage_5bfe16_idx"
            ),
        ),
        migrations.AlterUniqueTogether(
            name="vtdcdintersection",
            unique_together={("vtd", "congressional_district", "vintage_year")},
        ),
    ]
