# -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-09-14 14:16
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Attribute',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('type', models.CharField(choices=[('C', 'Certified'), ('P', 'Painted')], max_length=1)),
                ('description', models.CharField(default='An item modifier', max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('pc_only', models.BooleanField(default=False)),
                ('xbox_only', models.BooleanField(default=False)),
                ('psn_only', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Pack',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20, unique=True)),
                ('release_date', models.DateField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Quality',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20, unique=True)),
                ('sort', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Type',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Variation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='variations', to='rocketitems.Item')),
            ],
        ),
        migrations.CreateModel(
            name='VariationAttribute',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('attribute', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rocketitems.Attribute')),
                ('variation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='attributes', to='rocketitems.Variation')),
            ],
        ),
        migrations.AddField(
            model_name='item',
            name='pack',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rocketitems.Pack'),
        ),
        migrations.AddField(
            model_name='item',
            name='quality',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rocketitems.Quality'),
        ),
        migrations.AddField(
            model_name='item',
            name='type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rocketitems.Type'),
        ),
        migrations.AlterUniqueTogether(
            name='attribute',
            unique_together=set([('name', 'type')]),
        ),
        migrations.AlterUniqueTogether(
            name='variationattribute',
            unique_together=set([('variation', 'attribute')]),
        ),
        migrations.AlterUniqueTogether(
            name='item',
            unique_together=set([('name', 'type')]),
        ),
    ]
