# Generated by Django 2.2.27 on 2022-03-26 12:46

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name="PasswordChange",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("last_changed", models.DateTimeField(auto_now_add=True, db_index=True)),
                ("user", models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name="PasswordHistory",
            fields=[
                ("id", models.BigAutoField(verbose_name="ID", serialize=False, auto_created=True, primary_key=True)),
                ("created", models.DateTimeField(auto_now_add=True, help_text="The date the entry was created.", verbose_name="created", db_index=True)),
                ("password", models.CharField(help_text="The encrypted password.", max_length=128, verbose_name="password")),
                ("user", models.ForeignKey(related_name="password_history_entries", verbose_name="user", to=settings.AUTH_USER_MODEL, help_text="The user this password history entry belongs to.", on_delete=django.db.models.deletion.CASCADE)),
            ],
            options={
                "ordering": ["-created"],
                "get_latest_by": "created",
                "verbose_name": "password history entry",
                "verbose_name_plural": "password history entries",
            },
            bases=(models.Model,),
        ),

    ]
