summaryrefslogtreecommitdiff
path: root/app/lttr/migrations/0006_auto_20200419_1617.py
blob: 5f547c905975e8eba39f2744cd932aad88600630 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Generated by Django 2.1.2 on 2020-04-19 16:17

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('lttr', '0005_auto_20200205_1606'),
    ]

    operations = [
        migrations.CreateModel(
            name='MailingStatus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.IntegerField(choices=[(-1, 'sent in test'), (0, 'sent'), (1, 'error'), (2, 'invalid email'), (4, 'opened'), (5, 'opened on site'), (6, 'link opened'), (7, 'unsubscription')], verbose_name='status')),
                ('creation_date', models.DateTimeField(auto_now_add=True, verbose_name='creation date')),
            ],
            options={
                'verbose_name': 'subscriber mailing status',
                'verbose_name_plural': 'subscriber mailing statuses',
                'ordering': ('-creation_date',),
            },
        ),
        migrations.AddField(
            model_name='newslettermailing',
            name='newsletter',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='lttr.Newsletter'),
        ),
        migrations.AddField(
            model_name='mailingstatus',
            name='newsletter_mailing',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='lttr.NewsletterMailing', verbose_name='newsletter'),
        ),
        migrations.AddField(
            model_name='mailingstatus',
            name='subscriber',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='lttr.Subscriber', verbose_name='subscriber'),
        ),
    ]