# Generated by Django 3.1.6 on 2021-02-08 07:38

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name="PasswordProfile",
            fields=[
                ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                (
                    "user",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE, related_name="+", to=settings.AUTH_USER_MODEL
                    ),
                ),
            ],
            options={
                "verbose_name": "password profile",
                "verbose_name_plural": "password profiles",
            },
        ),
        migrations.CreateModel(
            name="Password",
            fields=[
                ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("encoded", models.CharField(editable=False, max_length=128, verbose_name="password")),
                ("created", models.DateTimeField(auto_now_add=True)),
                (
                    "profile",
                    models.ForeignKey(
                        editable=False,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="password_history",
                        to="securepasswords.passwordprofile",
                    ),
                ),
            ],
            options={
                "verbose_name": "password",
                "verbose_name_plural": "passwords",
                "ordering": ["profile", "-created"],
            },
        ),
    ]
