From 1a883d94d8b75fd3353fa989a749affd63f5aa5c Mon Sep 17 00:00:00 2001 From: Adibov Date: Thu, 11 Jan 2024 19:08:57 +0330 Subject: [PATCH] refactor: remove certificate_uuid column --- ...participation_certificate_uuid_and_more.py | 21 +++++++++++++++++++ backend/backend_api/models.py | 2 -- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 backend/backend_api/migrations/0062_remove_presentationparticipation_certificate_uuid_and_more.py diff --git a/backend/backend_api/migrations/0062_remove_presentationparticipation_certificate_uuid_and_more.py b/backend/backend_api/migrations/0062_remove_presentationparticipation_certificate_uuid_and_more.py new file mode 100644 index 0000000..c8a1986 --- /dev/null +++ b/backend/backend_api/migrations/0062_remove_presentationparticipation_certificate_uuid_and_more.py @@ -0,0 +1,21 @@ +# Generated by Django 4.2.4 on 2024-01-11 15:37 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('backend_api', '0061_alter_presentationparticipation_certificate_and_more'), + ] + + operations = [ + migrations.RemoveField( + model_name='presentationparticipation', + name='certificate_uuid', + ), + migrations.RemoveField( + model_name='workshopregistration', + name='certificate_uuid', + ), + ] diff --git a/backend/backend_api/models.py b/backend/backend_api/models.py index 9d1d50b..396f971 100644 --- a/backend/backend_api/models.py +++ b/backend/backend_api/models.py @@ -293,7 +293,6 @@ class StatusChoices(models.IntegerChoices): user = models.ForeignKey(User, on_delete=models.CASCADE) status = models.IntegerField(choices=StatusChoices.choices, default=StatusChoices.AWAITING_PAYMENT) password = models.CharField(max_length=SMALL_MAX_LENGTH, default=random_password) - certificate_uuid = models.UUIDField(default=uuid.uuid4, editable=False, unique=True) certificate = models.FileField(upload_to=update_certificate_filename, null=True, default=None, blank=True) class Meta: @@ -313,7 +312,6 @@ class StatusChoices(models.IntegerChoices): user = models.ForeignKey(User, on_delete=models.CASCADE) status = models.IntegerField(choices=StatusChoices.choices, default=StatusChoices.AWAITING_PAYMENT) password = models.CharField(max_length=SMALL_MAX_LENGTH, default=random_password) - certificate_uuid = models.UUIDField(default=uuid.uuid4, editable=False, unique=True) certificate = models.FileField(upload_to=update_certificate_filename, null=True, default=None, blank=True) class Meta: