mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
confirmation: Migration to add expiry_date step 1.
The commit: 1. Adds the new field as nullable. 2. Adds code that'll create new Confirmation with the field set correctly. 3. For verifying validity of Confirmation object this still uses the old logic in get_object_from_key() to keep things functioning until we backfill the old objects in the next step. Thus this commit is deployable. Next we'll have a commit to run a backfill migration.
This commit is contained in:
committed by
Tim Abbott
parent
1c4ad6769d
commit
676edb3802
17
confirmation/migrations/0008_confirmation_expiry_date.py
Normal file
17
confirmation/migrations/0008_confirmation_expiry_date.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("confirmation", "0007_add_indexes"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="confirmation",
|
||||
name="expiry_date",
|
||||
field=models.DateTimeField(db_index=True, null=True),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
Reference in New Issue
Block a user