# -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-02-02 18:03
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('telegrambot', '0002_bot'),
    ]

    operations = [
        migrations.CreateModel(
            name='AuthToken',
            fields=[
                ('key', models.CharField(max_length=40, primary_key=True, serialize=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('chat_api', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='auth_token', to='telegrambot.Chat')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='auth_token', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Authentication Token',
                'verbose_name_plural': 'Authentications Tokens',
            },
        ),
        migrations.RemoveField(
            model_name='bot',
            name='name',
        ),
        migrations.AddField(
            model_name='bot',
            name='user_api',
            field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='bot', to='telegrambot.User', verbose_name='Bot User'),
        ),
    ]
