<filename>postal_code_api/migrations/0001_initial.py
# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-08 08:49
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='Country',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('country_code', models.CharField(max_length=16)),
                ('name', models.CharField(max_length=32)),
            ],
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=256)),
                ('json_data', models.TextField(null=True)),
                ('country', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='postal_code_api.Country')),
            ],
        ),
        migrations.CreateModel(
            name='Location_Synonim',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('synonim', models.CharField(max_length=256)),
                ('norm_name', models.CharField(max_length=256, null=True)),
                ('location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='postal_code_api.Location')),
            ],
        ),
        migrations.CreateModel(
            name='Postal_Code',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('postal_code', models.CharField(max_length=16)),
                ('location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='postal_code_api.Location')),
            ],
        ),
        migrations.CreateModel(
            name='Province',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('zip_code', models.CharField(max_length=16, null=True)),
                ('official_code', models.CharField(max_length=16, null=True)),
                ('name', models.CharField(max_length=32)),
                ('country', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='postal_code_api.Country')),
            ],
        ),
        migrations.CreateModel(
            name='Region',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('region_code', models.CharField(max_length=16)),
                ('name', models.CharField(max_length=32)),
                ('country', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='postal_code_api.Country')),
            ],
        ),
        migrations.AddField(
            model_name='province',
            name='region',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='postal_code_api.Region'),
        ),
        migrations.AddField(
            model_name='location',
            name='province',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='postal_code_api.Province'),
        ),
        migrations.AddField(
            model_name='location',
            name='region',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='postal_code_api.Region'),
        ),
    ]
