diff options
Diffstat (limited to 'app/lttr/migrations')
-rw-r--r-- | app/lttr/migrations/0001_initial.py | 60 | ||||
-rw-r--r-- | app/lttr/migrations/0002_subscriber_email_field.py | 18 | ||||
-rw-r--r-- | app/lttr/migrations/__init__.py | 0 |
3 files changed, 78 insertions, 0 deletions
diff --git a/app/lttr/migrations/0001_initial.py b/app/lttr/migrations/0001_initial.py new file mode 100644 index 0000000..9c06cd9 --- /dev/null +++ b/app/lttr/migrations/0001_initial.py @@ -0,0 +1,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)), + ], + ), + ] diff --git a/app/lttr/migrations/0002_subscriber_email_field.py b/app/lttr/migrations/0002_subscriber_email_field.py new file mode 100644 index 0000000..60ddcfd --- /dev/null +++ b/app/lttr/migrations/0002_subscriber_email_field.py @@ -0,0 +1,18 @@ +# Generated by Django 2.1.5 on 2019-02-09 14:16 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('lttr', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='subscriber', + name='email_field', + field=models.EmailField(blank=True, db_column='email', db_index=True, max_length=254, null=True), + ), + ] diff --git a/app/lttr/migrations/__init__.py b/app/lttr/migrations/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/lttr/migrations/__init__.py |