realm: Add datetime field for scheduled deletion of demo orgs.

This commit is a part of #19523.
This commit is contained in:
Eeshan Garg 2021-08-12 16:16:24 -02:30 committed by Tim Abbott
parent a808f02a22
commit 082dd99ed6
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 3.2.5 on 2021-08-12 18:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("zerver", "0341_usergroup_is_system_group"),
]
operations = [
migrations.AddField(
model_name="realm",
name="demo_organization_scheduled_deletion_date",
field=models.DateTimeField(default=None, null=True),
),
]

View File

@ -216,6 +216,9 @@ class Realm(models.Model):
string_id: str = models.CharField(max_length=MAX_REALM_SUBDOMAIN_LENGTH, unique=True)
date_created: datetime.datetime = models.DateTimeField(default=timezone_now)
demo_organization_scheduled_deletion_date: datetime.datetime = models.DateTimeField(
default=None, null=True
)
deactivated: bool = models.BooleanField(default=False)
# Redirect URL if the Realm has moved to another server