# -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-02-28 20:35
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('auth', '0007_alter_validators_add_error_messages'),
        ('environment', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Language',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=64, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='LanguageSkill',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('level', models.SmallIntegerField(choices=[(1, 'Basics'), (2, 'Intermediate'), (3, 'Fluent'), (4, 'Native')])),
                ('language', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='users.Language')),
            ],
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='profile', serialize=False, to=settings.AUTH_USER_MODEL)),
                ('role', models.CharField(choices=[('A', 'Admin'), ('R', 'Refugee'), ('M', 'Mentor')], db_index=True, max_length=1)),
                ('phone', models.CharField(blank=True, db_index=True, default='', max_length=32)),
                ('birth_year', models.IntegerField()),
                ('gender', models.CharField(choices=[('M', 'Male'), ('F', 'Female')], max_length=1)),
                ('created', models.DateTimeField(blank=True, db_index=True, default=django.utils.timezone.now, editable=False)),
                ('last_modified', models.DateTimeField(auto_now=True, db_index=True)),
                ('city', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='environment.City')),
            ],
            options={
                'verbose_name': 'User profile',
                'verbose_name_plural': 'User profiles',
            },
        ),
        migrations.AddField(
            model_name='languageskill',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
