# Generated by Django 3.1.2 on 2020-12-21 08:38

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


class Migration(migrations.Migration):

    dependencies = [
        ('Profile', '0002_auto_20201220_0203'),
    ]

    operations = [
        migrations.CreateModel(
            name='AccessToken',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('token', models.CharField(blank=True, max_length=128, unique=True)),
                ('expires', models.DateTimeField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': '"auth_access_token"',
            },
        ),
        migrations.AlterField(
            model_name='emailconfirmation',
            name='token',
            field=models.CharField(default='QYjbG6nUTMYfo9pt8Ro637OY-3Jk3JtNt3JMSEHLnAA', editable=False, max_length=250),
        ),
        migrations.AlterField(
            model_name='passwordreset',
            name='url_token',
            field=models.CharField(default='JgSeiR_nKReKEa-LW6DoHUNuaTFQ5pNnwu_z1KybrLQ', editable=False, max_length=250),
        ),
        migrations.CreateModel(
            name='RefreshToken',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('token', models.CharField(max_length=255)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('revoked', models.DateTimeField(null=True)),
                ('access_token', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='refresh_token', to='Profile.accesstoken')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='user_refresh_token', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': '"auth_refresh_token"',
                'unique_together': {('token', 'revoked')},
            },
        ),
    ]
