# -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-02-11 11:04
from __future__ import unicode_literals

from django.conf import settings
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Subscription',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('contact', models.CharField(max_length=36)),
                ('version', models.IntegerField(default=1)),
                ('messageset_id', models.IntegerField()),
                ('next_sequence_number', models.IntegerField(default=1)),
                ('lang', models.CharField(max_length=6)),
                ('active', models.BooleanField(default=True)),
                ('completed', models.BooleanField(default=False)),
                ('schedule', models.IntegerField(default=1)),
                ('process_status', models.IntegerField(default=0)),
                ('metadata', django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('created_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='registrations_created', to=settings.AUTH_USER_MODEL)),
                ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='registrations_updated', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
