# -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-03-15 00:56
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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Form',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('form_id', models.IntegerField()),
                ('version', models.IntegerField()),
                ('name', models.TextField()),
                ('description', models.TextField(blank=True)),
                ('elements', django.contrib.postgres.fields.jsonb.JSONField()),
            ],
            options={
                'ordering': ('-version',),
                'db_table': 'form',
            },
        ),
        migrations.CreateModel(
            name='FormSubmission',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('state', models.IntegerField(choices=[(0, 'draft'), (1, 'submitted'), (2, 'approved'), (3, 'denied')])),
                ('modified', models.DateField()),
                ('submission', django.contrib.postgres.fields.jsonb.JSONField()),
                ('form', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='constellation_forms.Form')),
                ('owner', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'form_submission',
            },
        ),
        migrations.CreateModel(
            name='Validator',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField()),
                ('regex', models.TextField()),
            ],
            options={
                'db_table': 'validators',
            },
        ),
        migrations.AlterUniqueTogether(
            name='form',
            unique_together=set([('form_id', 'version')]),
        ),
    ]

[((356, 413), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (387, 413), False, 'from django.db import migrations, models\n'), ((542, 635), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n    verbose_name='ID')\n", (558, 635), False, 'from django.db import migrations, models\n'), ((662, 683), 'django.db.models.IntegerField', 'models.IntegerField', ([], {}), '()\n', (681, 683), False, 'from django.db import migrations, models\n'), ((714, 735), 'django.db.models.IntegerField', 'models.IntegerField', ([], {}), '()\n', (733, 735), False, 'from django.db import migrations, models\n'), ((763, 781), 'django.db.models.TextField', 'models.TextField', ([], {}), '()\n', (779, 781), False, 'from django.db import migrations, models\n'), ((816, 844), 'django.db.models.TextField', 'models.TextField', ([], {'blank': '(True)'}), '(blank=True)\n', (832, 844), False, 'from django.db import migrations, models\n'), ((1180, 1273), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n    verbose_name='ID')\n", (1196, 1273), False, 'from django.db import migrations, models\n'), ((1298, 1396), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'choices': "[(0, 'draft'), (1, 'submitted'), (2, 'approved'), (3, 'denied')]"}), "(choices=[(0, 'draft'), (1, 'submitted'), (2, 'approved'\n    ), (3, 'denied')])\n", (1317, 1396), False, 'from django.db import migrations, models\n'), ((1423, 1441), 'django.db.models.DateField', 'models.DateField', ([], {}), '()\n', (1439, 1441), False, 'from django.db import migrations, models\n'), ((1551, 1649), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'to': '"""constellation_forms.Form"""'}), "(on_delete=django.db.models.deletion.CASCADE, to=\n    'constellation_forms.Form')\n", (1568, 1649), False, 'from django.db import migrations, models\n'), ((1673, 1792), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'blank': '(True)', 'null': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'to': 'settings.AUTH_USER_MODEL'}), '(blank=True, null=True, on_delete=django.db.models.\n    deletion.CASCADE, to=settings.AUTH_USER_MODEL)\n', (1690, 1792), False, 'from django.db import migrations, models\n'), ((2006, 2099), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n    verbose_name='ID')\n", (2022, 2099), False, 'from django.db import migrations, models\n'), ((2123, 2141), 'django.db.models.TextField', 'models.TextField', ([], {}), '()\n', (2139, 2141), False, 'from django.db import migrations, models\n'), ((2170, 2188), 'django.db.models.TextField', 'models.TextField', ([], {}), '()\n', (2186, 2188), False, 'from django.db import migrations, models\n')]