27 lines
819 B
Python
27 lines
819 B
Python
# Generated by Django 5.2.19 on 2026-11-22 05:33
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
def preserve_existing_links(apps, schema_editor):
|
|
subscribers = apps.get_model('catalog', 'NewsletterSubscriber')
|
|
subscribers.objects.using(schema_editor.connection.alias).filter(
|
|
confirm_queued=False, requested_at__isnull=False,
|
|
).update(confirmation_issued_at=models.F('requested_at'))
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('catalog', '0017_countdown_showcase'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AddField(
|
|
model_name='newslettersubscriber',
|
|
name='confirmation_issued_at',
|
|
field=models.DateTimeField(blank=True, null=True),
|
|
),
|
|
migrations.RunPython(preserve_existing_links, migrations.RunPython.noop),
|
|
]
|