From 8098ffd83eebe64cdd9bdffae28cc172fa4caba4 Mon Sep 17 00:00:00 2001 From: Marek Date: Mon, 16 Oct 2023 00:32:09 +0200 Subject: [PATCH] Add migration for AppUser is_active and EmailVerification changes --- ...003_appuser_is_active_emailverification.py | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 user_api/migrations/0003_appuser_is_active_emailverification.py diff --git a/user_api/migrations/0003_appuser_is_active_emailverification.py b/user_api/migrations/0003_appuser_is_active_emailverification.py new file mode 100644 index 0000000..50c2101 --- /dev/null +++ b/user_api/migrations/0003_appuser_is_active_emailverification.py @@ -0,0 +1,30 @@ +# Generated by Django 4.2 on 2023-10-07 22:14 + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion +import uuid + + +class Migration(migrations.Migration): + + dependencies = [ + ('user_api', '0002_appuser_is_staff'), + ] + + operations = [ + migrations.AddField( + model_name='appuser', + name='is_active', + field=models.BooleanField(default=False), + ), + migrations.CreateModel( + name='EmailVerification', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('token', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), + ('expiry_date', models.DateTimeField()), + ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + ), + ]