2015-06-17 10:34:14 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
2024-07-12 09:41:44 +00:00
|
|
|
# Generated by Django 1.10.5 on 2021-04-22 11:28
|
2015-06-17 10:34:14 +00:00
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
2024-07-12 09:41:44 +00:00
|
|
|
from django.db import migrations, models
|
2021-04-22 12:18:01 +00:00
|
|
|
import django.db.models.deletion
|
2015-06-17 10:34:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='Message',
|
|
|
|
fields=[
|
2024-07-12 09:41:44 +00:00
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
('state', models.CharField(choices=[('QUEUED', 'Queued'), ('SENT', 'Sent'), ('DEFERRED', 'Deferred'), ('FAILED', 'Failes')], default='QUEUED', max_length=16, verbose_name='State')),
|
2015-06-17 10:34:14 +00:00
|
|
|
('priority', models.PositiveIntegerField(choices=[(0, 'Critical (not queued)'), (1, 'High'), (2, 'Normal'), (3, 'Low')], default=2, verbose_name='Priority')),
|
|
|
|
('to_address', models.CharField(max_length=256)),
|
|
|
|
('from_address', models.CharField(max_length=256)),
|
|
|
|
('subject', models.CharField(max_length=256, verbose_name='subject')),
|
|
|
|
('content', models.TextField(verbose_name='content')),
|
|
|
|
('created_at', models.DateTimeField(auto_now_add=True, verbose_name='created at')),
|
|
|
|
('retries', models.PositiveIntegerField(default=0, verbose_name='retries')),
|
|
|
|
('last_retry', models.DateTimeField(auto_now=True, verbose_name='last try')),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='SMTPLog',
|
|
|
|
fields=[
|
2024-07-12 09:41:44 +00:00
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
2015-06-17 10:34:14 +00:00
|
|
|
('result', models.CharField(choices=[('SUCCESS', 'Success'), ('FAILURE', 'Failure')], default='SUCCESS', max_length=16)),
|
|
|
|
('date', models.DateTimeField(auto_now_add=True)),
|
|
|
|
('log_message', models.TextField()),
|
2024-07-12 09:41:44 +00:00
|
|
|
('message', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='logs', to='mailer.Message')),
|
2015-06-17 10:34:14 +00:00
|
|
|
],
|
|
|
|
),
|
2024-07-12 09:41:44 +00:00
|
|
|
migrations.RenameField(
|
|
|
|
model_name='message',
|
|
|
|
old_name='last_retry',
|
|
|
|
new_name='last_try',
|
|
|
|
),
|
|
|
|
migrations.AlterField(
|
|
|
|
model_name='message',
|
|
|
|
name='last_try',
|
|
|
|
field=models.DateTimeField(verbose_name='last try'),
|
|
|
|
),
|
|
|
|
migrations.AlterField(
|
|
|
|
model_name='message',
|
|
|
|
name='subject',
|
|
|
|
field=models.TextField(verbose_name='subject'),
|
|
|
|
),
|
|
|
|
migrations.AlterField(
|
|
|
|
model_name='message',
|
|
|
|
name='last_try',
|
|
|
|
field=models.DateTimeField(null=True, verbose_name='last try'),
|
|
|
|
),
|
|
|
|
migrations.AlterField(
|
|
|
|
model_name='message',
|
|
|
|
name='state',
|
|
|
|
field=models.CharField(choices=[('QUEUED', 'Queued'), ('SENT', 'Sent'), ('DEFERRED', 'Deferred'), ('FAILED', 'Failed')], default='QUEUED', max_length=16, verbose_name='State'),
|
|
|
|
),
|
|
|
|
migrations.AlterField(
|
|
|
|
model_name='message',
|
|
|
|
name='last_try',
|
|
|
|
field=models.DateTimeField(db_index=True, null=True, verbose_name='last try'),
|
|
|
|
),
|
|
|
|
migrations.AlterField(
|
|
|
|
model_name='message',
|
|
|
|
name='priority',
|
|
|
|
field=models.PositiveIntegerField(choices=[(0, 'Critical (not queued)'), (1, 'High'), (2, 'Normal'), (3, 'Low')], db_index=True, default=2, verbose_name='Priority'),
|
|
|
|
),
|
|
|
|
migrations.AlterField(
|
|
|
|
model_name='message',
|
|
|
|
name='retries',
|
|
|
|
field=models.PositiveIntegerField(db_index=True, default=0, verbose_name='retries'),
|
|
|
|
),
|
|
|
|
migrations.AlterField(
|
|
|
|
model_name='message',
|
|
|
|
name='state',
|
|
|
|
field=models.CharField(choices=[('QUEUED', 'Queued'), ('SENT', 'Sent'), ('DEFERRED', 'Deferred'), ('FAILED', 'Failed')], db_index=True, default='QUEUED', max_length=16, verbose_name='State'),
|
|
|
|
),
|
2015-06-17 10:34:14 +00:00
|
|
|
]
|