summaryrefslogtreecommitdiff
path: root/app/lttr/migrations/0001_initial.py
blob: 9c06cd9d4acef7e3fe143fdd29392aa634062990 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Generated by Django 2.1.5 on 2019-02-09 07:10

import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import lttr.models
import taggit.managers


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('taxonomy', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Newsletter',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=250)),
            ],
        ),
        migrations.CreateModel(
            name='NewsletterMailing',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=250)),
                ('slug', models.SlugField(blank=True, unique_for_date='pub_date')),
                ('pub_date', models.DateTimeField()),
                ('status', models.IntegerField(choices=[(0, 'Not Published'), (1, 'Published')], default=0)),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('tags', taggit.managers.TaggableManager(blank=True, help_text='Topics Covered', through='taxonomy.TaggedItems', to='taxonomy.LuxTag', verbose_name='Tags')),
            ],
            options={
                'ordering': ('-title', '-date_created'),
            },
        ),
        migrations.CreateModel(
            name='Subscriber',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_updated', models.DateTimeField(auto_now=True)),
                ('ip', models.GenericIPAddressField(blank=True, null=True)),
                ('create_date', models.DateTimeField(default=datetime.datetime.now, editable=False)),
                ('activation_code', models.CharField(default=lttr.models.make_activation_code, max_length=40)),
                ('subscribed', models.BooleanField(db_index=True, default=False)),
                ('subscribe_date', models.DateTimeField(blank=True, null=True)),
                ('unsubscribed', models.BooleanField(db_index=True, default=False)),
                ('unsubscribe_date', models.DateTimeField(blank=True, null=True)),
                ('newsletter', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='lttr.Newsletter')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]