# -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-09-20 07:11

from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Column',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('parent_table_id', models.CharField(max_length=8)),
                ('column_id', models.CharField(max_length=16)),
                ('column_order', models.DecimalField(decimal_places=1, max_digits=4)),
                ('column_name', models.CharField(max_length=255)),
                ('indent_value', models.IntegerField(blank=True, null=True)),
                ('parent_column_id', models.CharField(max_length=255)),
                ('has_children', models.BooleanField()),
            ],
            options={
                'ordering': ('table__table_id', 'table__release', 'column_id'),
            },
        ),
        migrations.CreateModel(
            name='Geography',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('full_geoid', models.CharField(max_length=16)),
                ('full_name', models.CharField(max_length=128)),
                ('sumlev', models.CharField(max_length=3)),
                ('geo_type', models.CharField(max_length=24)),
                ('region', models.CharField(blank=True, max_length=2, null=True)),
                ('region_name', models.CharField(blank=True, max_length=24)),
                ('division', models.CharField(blank=True, max_length=2, null=True)),
                ('division_name', models.CharField(blank=True, max_length=24)),
                ('statefp', models.CharField(blank=True, max_length=2, null=True)),
                ('geoid', models.CharField(blank=True, max_length=24, null=True)),
                ('cd112fp', models.CharField(blank=True, max_length=12, null=True)),
                ('cdsessn', models.CharField(blank=True, max_length=12, null=True)),
                ('countyfp', models.CharField(blank=True, max_length=12, null=True)),
                ('placefp', models.CharField(blank=True, max_length=12, null=True)),
                ('classfp', models.CharField(blank=True, max_length=12)),
                ('sldlst', models.CharField(blank=True, max_length=12, null=True)),
                ('sldust', models.CharField(blank=True, max_length=12, null=True)),
                ('elsdlea', models.CharField(blank=True, max_length=12, null=True)),
                ('scsdlea', models.CharField(blank=True, max_length=12, null=True)),
                ('unsdlea', models.CharField(blank=True, max_length=12, null=True)),
                ('pcicbsa', models.CharField(blank=True, max_length=1, null=True)),
                ('pcinecta', models.CharField(blank=True, max_length=1, null=True)),
                ('csafp', models.CharField(blank=True, max_length=12, null=True)),
                ('cbsafp', models.CharField(blank=True, max_length=12, null=True)),
                ('metdivfp', models.CharField(blank=True, max_length=12, null=True)),
                ('zcta5ce10', models.CharField(blank=True, max_length=12, null=True)),
                ('name', models.CharField(blank=True, max_length=128)),
                ('namelsad', models.CharField(blank=True, max_length=128)),
                ('lsad', models.CharField(blank=True, max_length=4, null=True)),
                ('aland', models.CharField(blank=True, max_length=24, null=True)),
                ('intptlat', models.CharField(blank=True, max_length=16)),
                ('intptlon', models.CharField(blank=True, max_length=16)),
            ],
            options={
                'ordering': ('full_geoid',),
                'verbose_name_plural': 'Geographies',
            },
        ),
        migrations.CreateModel(
            name='SubjectConcept',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('slug', models.SlugField()),
                ('census_category', models.CharField(blank=True, default=b'Population', max_length=128)),
                ('census_description', models.TextField(blank=True)),
                ('census_history', models.TextField(blank=True)),
                ('census_comparability', models.TextField(blank=True)),
                ('census_notes', models.TextField(blank=True)),
                ('description', models.TextField(blank=True)),
                ('source', models.CharField(blank=True, default=b'American Community Survey Subject Definitions', max_length=64)),
            ],
            options={
                'ordering': ('name',),
            },
        ),
        migrations.CreateModel(
            name='SummaryLevel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('summary_level', models.CharField(max_length=3)),
                ('name', models.CharField(max_length=128)),
                ('slug', models.SlugField()),
                ('short_name', models.CharField(blank=True, max_length=128)),
                ('plural_name', models.CharField(blank=True, max_length=128)),
                ('description', models.TextField(blank=True)),
                ('census_description', models.TextField(blank=True)),
                ('census_code_description', models.TextField(blank=True)),
                ('census_notes', models.TextField(blank=True)),
                ('source', models.CharField(blank=True, max_length=64)),
                ('ancestors', models.ManyToManyField(blank=True, related_name='descendants', to='census.SummaryLevel')),
                ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='census.SummaryLevel')),
            ],
            options={
                'ordering': ('summary_level',),
            },
        ),
        migrations.CreateModel(
            name='Table',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('table_id', models.CharField(max_length=8)),
                ('table_name', models.CharField(max_length=255)),
                ('table_universe', models.CharField(max_length=128)),
                ('table_size', models.IntegerField()),
                ('subject_area', models.CharField(max_length=32)),
                ('topics', models.CharField(blank=True, max_length=255)),
                ('release', models.CharField(max_length=16)),
            ],
            options={
                'ordering': ('release', 'table_id'),
            },
        ),
        migrations.AddField(
            model_name='column',
            name='table',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='census.Table'),
        ),
    ]
