# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-02 02:19
from __future__ import unicode_literals

from django.conf import settings
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='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='user')),
            ],
            options={
                'verbose_name': 'profile',
                'verbose_name_plural': 'profiles',
            },
        ),
        migrations.CreateModel(
            name='ProfileData',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('data', models.CharField(blank=True, max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='ProfileDataField',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=60)),
                ('description', models.CharField(blank=True, max_length=255)),
                ('choices', models.CharField(blank=True, max_length=512)),
                ('field_type', models.CharField(choices=[('text', 'Text'), ('longtext', 'Long Text'), ('choice', 'Choice')], max_length=30)),
                ('order', models.PositiveIntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='ProfileDataGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=60, unique=True)),
                ('order', models.PositiveIntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='ProfileTextData',
            fields=[
                ('profiledata_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='dynamicprofiles.ProfileData')),
                ('text_data', models.TextField(blank=True)),
            ],
            bases=('dynamicprofiles.profiledata',),
        ),
        migrations.AddField(
            model_name='profiledatafield',
            name='group',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dynamicprofiles.ProfileDataGroup'),
        ),
        migrations.AddField(
            model_name='profiledata',
            name='field',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dynamicprofiles.ProfileDataField'),
        ),
        migrations.AddField(
            model_name='profiledata',
            name='profile',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dynamicprofiles.Profile'),
        ),
        migrations.AlterUniqueTogether(
            name='profiledatafield',
            unique_together=set([('name', 'group')]),
        ),
    ]
