From eb0a58170c18a9d91fb5105b3b8d846a02049fbf Mon Sep 17 00:00:00 2001 From: Kumi Date: Sat, 16 Nov 2024 21:22:34 +0100 Subject: [PATCH] feat(migration): Add timestamp to UserRegistration Introduces a timestamp field to record creation time in the UserRegistration model, improving traceability. Updates status field with expanded choice set for status handling, diversifying registration status representations. --- ...003_userregistration_timestamp_and_more.py | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/synapse_registration/registration/migrations/0003_userregistration_timestamp_and_more.py diff --git a/src/synapse_registration/registration/migrations/0003_userregistration_timestamp_and_more.py b/src/synapse_registration/registration/migrations/0003_userregistration_timestamp_and_more.py new file mode 100644 index 0000000..831c08d --- /dev/null +++ b/src/synapse_registration/registration/migrations/0003_userregistration_timestamp_and_more.py @@ -0,0 +1,35 @@ +# Generated by Django 5.1.3 on 2024-11-16 20:22 + +import django.utils.timezone +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("registration", "0002_alter_userregistration_email_and_more"), + ] + + operations = [ + migrations.AddField( + model_name="userregistration", + name="timestamp", + field=models.DateTimeField( + auto_now_add=True, default=django.utils.timezone.now + ), + preserve_default=False, + ), + migrations.AlterField( + model_name="userregistration", + name="status", + field=models.IntegerField( + choices=[ + (0, "Started"), + (1, "Requested"), + (2, "Approved"), + (3, "Denied"), + ], + default=0, + ), + ), + ]