2020-05-07 23:46:09 +00:00
|
|
|
# Generated by Django 3.0.6 on 2020-05-07 23:43
|
2020-04-29 02:33:13 +00:00
|
|
|
|
|
|
|
from django.db import migrations, models
|
|
|
|
import django.db.models.deletion
|
2020-05-07 23:46:09 +00:00
|
|
|
import uuid
|
2020-04-29 02:33:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
initial = True
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='Campaign',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
2020-05-01 00:48:00 +00:00
|
|
|
('name', models.CharField(help_text='The name of the campaign', max_length=255)),
|
2020-04-29 02:33:13 +00:00
|
|
|
('subject', models.TextField()),
|
2020-05-01 00:48:00 +00:00
|
|
|
('sent_date', models.DateTimeField(blank=True, null=True)),
|
2020-04-29 02:33:13 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='Contact',
|
|
|
|
fields=[
|
2020-05-07 23:46:09 +00:00
|
|
|
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
|
|
|
('email', models.EmailField(max_length=254, unique=True)),
|
2020-04-29 02:33:13 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='Receipt',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
2020-05-01 00:48:00 +00:00
|
|
|
('sent_date', models.DateTimeField(auto_now=True)),
|
|
|
|
('success', models.BooleanField(default=False)),
|
|
|
|
('campaign', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='birdsong.Campaign')),
|
|
|
|
('contact', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='birdsong.Contact')),
|
2020-04-29 02:33:13 +00:00
|
|
|
],
|
|
|
|
),
|
2020-04-29 03:34:18 +00:00
|
|
|
migrations.AddField(
|
|
|
|
model_name='campaign',
|
|
|
|
name='receipts',
|
2020-05-01 00:48:00 +00:00
|
|
|
field=models.ManyToManyField(through='birdsong.Receipt', to='birdsong.Contact'),
|
2020-04-29 03:34:18 +00:00
|
|
|
),
|
2020-05-01 00:48:00 +00:00
|
|
|
]
|