# Generated by Django 3.2 on 2021-04-09 04:07

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),
        ('vstutils_api', '0003_tfa_indexes'),
    ]

    operations = [
        migrations.CreateModel(
            name='UserSettings',
            fields=[
                ('id', models.AutoField(max_length=20, primary_key=True, serialize=False)),
                ('hidden', models.BooleanField(default=False)),
                ('value', models.JSONField(default=dict)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddIndex(
            model_name='recoverycode',
            index=models.Index(fields=['id', 'key', 'tfa'], name='vstutils_api_recov_fullidx'),
        ),
        migrations.AddIndex(
            model_name='twofactor',
            index=models.Index(fields=['user', 'secret'], name='vstutils_api_tfa_fullidx'),
        ),
        migrations.AddField(
            model_name='usersettings',
            name='user',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='_settings', to=settings.AUTH_USER_MODEL),
        ),
    ]
