# -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2016-07-29 18:37

import common.fields
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('open_humans', '0001_squashed_0016_auto_20150410_2301'),
        ('contenttypes', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Participant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('enrolled', models.BooleanField(default=False)),
                ('signature', models.CharField(max_length=70)),
                ('enrollment_date', models.DateTimeField(auto_now_add=True)),
                ('member', common.fields.AutoOneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='public_data_participant', to='open_humans.Member')),
            ],
        ),
        migrations.CreateModel(
            name='PublicDataAccess',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('data_file_id', models.PositiveIntegerField()),
                ('is_public', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='WithdrawalFeedback',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('feedback', models.TextField()),
                ('withdrawal_date', models.DateTimeField(auto_now_add=True)),
                ('member', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='open_humans.Member')),
            ],
        ),
        migrations.AlterField(
            model_name='withdrawalfeedback',
            name='feedback',
            field=models.TextField(blank=True),
        ),
        migrations.RenameModel(
            old_name='PublicDataAccess',
            new_name='PublicDataFileAccess',
        ),
        migrations.CreateModel(
            name='PublicDataAccess',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('data_source', models.CharField(max_length=100)),
                ('is_public', models.BooleanField(default=False)),
                ('participant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='public_data.Participant')),
            ],
        ),
        migrations.DeleteModel(
            name='PublicDataFileAccess',
        ),
    ]
