# -*- coding: utf-8 -*-
# Generated by Django 1.9c1 on 2015-11-17 08:55
from __future__ import unicode_literals

import datetime
from django.db import migrations, models
import django.db.models.deletion
import functools
import django.utils.crypto


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('reminders', '0002_reminder_type'),
    ]

    operations = [
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ident', models.CharField(default=functools.partial(django.utils.crypto.get_random_string, *(40,), **{}), max_length=40, unique=True)),
                ('twilio_sid', models.CharField(max_length=34, unique=True)),
                ('traceback', models.TextField()),
                ('created', models.DateTimeField(default=datetime.datetime.utcnow)),
                ('state', models.IntegerField(choices=[(10, b'sending'), (20, b'sent'), (30, b'delivered'), (40, b'failed'), (50, b'unknown')], default=10)),
                ('instance', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='messages', to='reminders.Instance')),
            ],
            options={
                'ordering': ('-created',),
                'abstract': False,
                'get_latest_by': 'created',
            },
        ),
    ]
