text: # -*- coding: utf-8 -*-
  # Generated by Django 1.10.5 on 2021-04-22 11:28
  from __future__ import unicode_literals
  
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      replaces = [('mailer', '0001_initial'), ('mailer', '0002_auto_20150617_1021'), ('mailer', '0003_auto_20150617_1024'), ('mailer', '0004_auto_20150805_1328'), ('mailer', '0005_auto_20160219_1056')]
  
      initial = True
  
      dependencies = [
      ]
  
      operations = [
          migrations.CreateModel(
              name='Message',
              fields=[
                  ('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')),
                  ('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=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('result', models.CharField(choices=[('SUCCESS', 'Success'), ('FAILURE', 'Failure')], default='SUCCESS', max_length=16)),
                  ('date', models.DateTimeField(auto_now_add=True)),
                  ('log_message', models.TextField()),
                  ('message', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='logs', to='mailer.Message')),
              ],
          ),
          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'),
          ),
      ]
  