Add migration

This commit is contained in:
CocoByte 2023-09-26 13:15:13 -06:00
parent 7eba613af8
commit 57133ba0f7
No known key found for this signature in database
GPG key ID: BBFAA2526384C97F
3 changed files with 29 additions and 5 deletions

View file

@ -181,7 +181,7 @@ class Command(BaseCommand):
new_entry_domainName = row[0].lower()
userId = row[1]
new_entry_status = TransitionDomain.StatusChoices.CREATED
new_entry_status = TransitionDomain.StatusChoices.READY
new_entry_email = ""
new_entry_emailSent = False
# TODO: how to know if e-mail was sent?
@ -383,8 +383,8 @@ transtion_domain table for domain:
"hold": TransitionDomain.StatusChoices.HOLD,
"serverhold": TransitionDomain.StatusChoices.HOLD,
"clienthold": TransitionDomain.StatusChoices.HOLD,
"created": TransitionDomain.StatusChoices.CREATED,
"ok": TransitionDomain.StatusChoices.CREATED,
"created": TransitionDomain.StatusChoices.READY,
"ok": TransitionDomain.StatusChoices.READY,
}
return status_maps[status_to_map]

View file

@ -0,0 +1,24 @@
# Generated by Django 4.2.1 on 2023-09-26 19:14
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("registrar", "0031_transitiondomain_and_more"),
]
operations = [
migrations.AlterField(
model_name="transitiondomain",
name="status",
field=models.CharField(
blank=True,
choices=[("ready", "Ready"), ("hold", "Hold")],
default="ready",
help_text="domain status during the transfer",
max_length=255,
verbose_name="Status",
),
),
]

View file

@ -4,7 +4,7 @@ from .utility.time_stamped_model import TimeStampedModel
class StatusChoices(models.TextChoices):
CREATED = "created", "Created"
READY = "ready", "Ready"
HOLD = "hold", "Hold"
@ -30,7 +30,7 @@ class TransitionDomain(TimeStampedModel):
max_length=255,
null=False,
blank=True,
default=StatusChoices.CREATED,
default=StatusChoices.READY,
choices=StatusChoices.choices,
verbose_name="Status",
help_text="domain status during the transfer",