# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-07-21 05:35
from __future__ import unicode_literals

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='Fabrication',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sample_id', models.CharField(blank=True, max_length=255)),
                ('shared_location', models.CharField(blank=True, max_length=255)),
                ('metadata', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
                ('date_received', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Queue',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_added', models.DateTimeField(auto_now_add=True)),
                ('date_completed', models.DateTimeField(blank=True, null=True)),
                ('status', models.IntegerField(choices=[(1, b'started'), (2, b'completed')], default=1)),
            ],
        ),
        migrations.CreateModel(
            name='XRD',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('shared_location', models.CharField(blank=True, max_length=255)),
                ('metadata', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
                ('fabrication', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='xrd_characterizations', to='thirdendpt.Fabrication')),
            ],
        ),
        migrations.AddField(
            model_name='queue',
            name='xrd',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='queued_jobs', to='thirdendpt.XRD'),
        ),
    ]
