# -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-04-12 22:34
from __future__ import unicode_literals

import config.current_user
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('core', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='FinprintUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('token', models.CharField(blank=True, max_length=32, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Team',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_datetime', models.DateTimeField(auto_now_add=True)),
                ('last_modified_datetime', models.DateTimeField(auto_now=True)),
                ('sampler_collaborator', models.CharField(max_length=100)),
                ('lead', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='POC', to='core.FinprintUser')),
                ('user', models.ForeignKey(default=config.current_user.get_current_user, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AlterModelOptions(
            name='affiliation',
            options={'ordering': ['name']},
        ),
        migrations.AddField(
            model_name='finprintuser',
            name='affiliation',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Affiliation'),
        ),
        migrations.AddField(
            model_name='finprintuser',
            name='user',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterUniqueTogether(
            name='team',
            unique_together=set([('lead', 'sampler_collaborator')]),
        ),
    ]
