# Generated by Django 2.1.2 on 2018-12-11 14:48

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Qstring',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100, unique=True)),
                ('desc', models.CharField(max_length=100)),
                ('mappingset', models.CharField(max_length=50)),
                ('revision', models.CharField(max_length=100)),
                ('submission_url', models.CharField(max_length=100)),
                ('is_active', models.BooleanField(default=False)),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_updated', models.DateTimeField(auto_now=True)),
                ('date_deleted', models.DateTimeField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Submission',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sender', models.CharField(max_length=50)),
                ('payload', django.contrib.postgres.fields.jsonb.JSONField()),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_updated', models.DateTimeField(auto_now=True)),
                ('date_deleted', models.DateTimeField(blank=True, null=True)),
                ('qstring', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='submissions', to='server.Qstring')),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='submission',
            unique_together={('sender', 'qstring')},
        ),
    ]
