# Generated by Django 2.1.7 on 2019-04-05 02:40

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Language',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255)),
                ('averageProficiency', models.IntegerField(blank=True, default=None, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('text', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Proficiency',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('level', models.IntegerField(choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10)], unique=True)),
                ('language', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='language', to='penpal_app.Language')),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('firstName', models.CharField(max_length=50)),
                ('lastName', models.CharField(max_length=50)),
                ('email', models.CharField(max_length=255)),
            ],
        ),
        migrations.AddField(
            model_name='proficiency',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='proficiency', to='penpal_app.User'),
        ),
        migrations.AddField(
            model_name='message',
            name='fromUser',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='messagesSent', to='penpal_app.User'),
        ),
        migrations.AddField(
            model_name='message',
            name='language',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='messagesLanguage', to='penpal_app.Language'),
        ),
        migrations.AddField(
            model_name='message',
            name='toUser',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='messagesRecieved', to='penpal_app.User'),
        ),
    ]
