# Generated by Django 2.1 on 2018-08-21 21:08

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Entity',
            fields=[
                ('id', models.BigIntegerField(primary_key=True, serialize=False)),
                ('hash', models.BigIntegerField()),
                ('username', models.CharField(max_length=32)),
                ('phone', models.BigIntegerField()),
                ('name', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='Session',
            fields=[
                ('session_id', models.CharField(max_length=255, primary_key=True, serialize=False)),
                ('dc_id', models.IntegerField()),
                ('server_address', models.CharField(max_length=255)),
                ('port', models.IntegerField()),
                ('auth_key', models.BinaryField()),
            ],
        ),
        migrations.CreateModel(
            name='Version',
            fields=[
                ('version', models.CharField(max_length=255, primary_key=True, serialize=False)),
            ],
        ),
        migrations.CreateModel(
            name='SentFile',
            fields=[
                ('session', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='telethon_django.Session')),
                ('md5_digest', models.BinaryField()),
                ('file_size', models.IntegerField()),
                ('type', models.IntegerField()),
                ('id', models.BigIntegerField()),
                ('hash', models.BigIntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='UpdateState',
            fields=[
                ('session', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='telethon_django.Session')),
                ('pts', models.BigIntegerField()),
                ('qts', models.BigIntegerField()),
                ('date', models.BigIntegerField()),
                ('seq', models.BigIntegerField()),
                ('unread_count', models.IntegerField()),
            ],
        ),
        migrations.AddField(
            model_name='entity',
            name='session',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='telethon_django.Session'),
        ),
        migrations.AddField(
            model_name='updatestate',
            name='entity',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='telethon_django.Entity'),
        ),
    ]
