mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-12 20:49:41 +02:00
Add migration
This commit is contained in:
parent
7eba613af8
commit
57133ba0f7
3 changed files with 29 additions and 5 deletions
|
@ -181,7 +181,7 @@ class Command(BaseCommand):
|
||||||
new_entry_domainName = row[0].lower()
|
new_entry_domainName = row[0].lower()
|
||||||
userId = row[1]
|
userId = row[1]
|
||||||
|
|
||||||
new_entry_status = TransitionDomain.StatusChoices.CREATED
|
new_entry_status = TransitionDomain.StatusChoices.READY
|
||||||
new_entry_email = ""
|
new_entry_email = ""
|
||||||
new_entry_emailSent = False
|
new_entry_emailSent = False
|
||||||
# TODO: how to know if e-mail was sent?
|
# TODO: how to know if e-mail was sent?
|
||||||
|
@ -383,8 +383,8 @@ transtion_domain table for domain:
|
||||||
"hold": TransitionDomain.StatusChoices.HOLD,
|
"hold": TransitionDomain.StatusChoices.HOLD,
|
||||||
"serverhold": TransitionDomain.StatusChoices.HOLD,
|
"serverhold": TransitionDomain.StatusChoices.HOLD,
|
||||||
"clienthold": TransitionDomain.StatusChoices.HOLD,
|
"clienthold": TransitionDomain.StatusChoices.HOLD,
|
||||||
"created": TransitionDomain.StatusChoices.CREATED,
|
"created": TransitionDomain.StatusChoices.READY,
|
||||||
"ok": TransitionDomain.StatusChoices.CREATED,
|
"ok": TransitionDomain.StatusChoices.READY,
|
||||||
}
|
}
|
||||||
return status_maps[status_to_map]
|
return status_maps[status_to_map]
|
||||||
|
|
||||||
|
|
|
@ -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",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
|
@ -4,7 +4,7 @@ from .utility.time_stamped_model import TimeStampedModel
|
||||||
|
|
||||||
|
|
||||||
class StatusChoices(models.TextChoices):
|
class StatusChoices(models.TextChoices):
|
||||||
CREATED = "created", "Created"
|
READY = "ready", "Ready"
|
||||||
HOLD = "hold", "Hold"
|
HOLD = "hold", "Hold"
|
||||||
|
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ class TransitionDomain(TimeStampedModel):
|
||||||
max_length=255,
|
max_length=255,
|
||||||
null=False,
|
null=False,
|
||||||
blank=True,
|
blank=True,
|
||||||
default=StatusChoices.CREATED,
|
default=StatusChoices.READY,
|
||||||
choices=StatusChoices.choices,
|
choices=StatusChoices.choices,
|
||||||
verbose_name="Status",
|
verbose_name="Status",
|
||||||
help_text="domain status during the transfer",
|
help_text="domain status during the transfer",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue