mirror of https://github.com/zulip/zulip.git
confirmation: Migration to add expiry_date - last step.
With the previous steps, all Confirmation objects should have been migrated and the expiry_date field is being used for checking confirmation validity - so all that's left is to set the NOT NULL constraint on the column.
This commit is contained in:
parent
de5fc7826b
commit
9caa71c7fd
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 3.2.5 on 2021-08-02 19:03
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("confirmation", "0009_confirmation_expiry_date_backfill"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="confirmation",
|
||||
name="expiry_date",
|
||||
field=models.DateTimeField(db_index=True),
|
||||
),
|
||||
]
|
|
@ -133,7 +133,7 @@ class Confirmation(models.Model):
|
|||
content_object = GenericForeignKey("content_type", "object_id")
|
||||
date_sent: datetime.datetime = models.DateTimeField(db_index=True)
|
||||
confirmation_key: str = models.CharField(max_length=40, db_index=True)
|
||||
expiry_date: datetime.datetime = models.DateTimeField(db_index=True, null=True)
|
||||
expiry_date: datetime.datetime = models.DateTimeField(db_index=True)
|
||||
realm: Optional[Realm] = models.ForeignKey(Realm, null=True, on_delete=CASCADE)
|
||||
|
||||
# The following list is the set of valid types
|
||||
|
|
Loading…
Reference in New Issue