# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-07-30 19:57
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Artist',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('full_name', models.CharField(max_length=127, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Card',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, unique=True)),
                ('mana_cost', models.CharField(blank=True, max_length=63)),
                ('text', models.TextField(blank=True)),
                ('power', models.CharField(blank=True, max_length=7)),
                ('toughness', models.CharField(blank=True, max_length=7)),
            ],
            bases=(magic_cards.models.NameMixin, models.Model),
        ),
        migrations.CreateModel(
            name='CardSubtype',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=32, unique=True)),
            ],
            bases=(magic_cards.models.NameMixin, models.Model),
        ),
        migrations.CreateModel(
            name='CardSupertype',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=32, unique=True)),
            ],
            bases=(magic_cards.models.NameMixin, models.Model),
        ),
        migrations.CreateModel(
            name='CardType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=32, unique=True)),
            ],
            bases=(magic_cards.models.NameMixin, models.Model),
        ),
        migrations.CreateModel(
            name='Printing',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rarity', django_light_enums.db.EnumField(choices=[(40, b'COMMON'), (10, b'MYTHIC'), (50, b'SPECIAL'), (20, b'RARE'), (60, b'BASIC_LAND'), (30, b'UNCOMMON')], default=10, enum_values=[40, 10, 50, 20, 60, 30])),
                ('flavor_text', models.TextField(blank=True)),
                ('number', models.CharField(blank=True, max_length=7)),
                ('multiverse_id', models.PositiveIntegerField(blank=True, null=True)),
                ('artist', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='printings', to='magic_cards.Artist')),
                ('card', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='printings', to='magic_cards.Card')),
            ],
        ),
        migrations.CreateModel(
            name='Set',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=63, unique=True)),
                ('code', models.CharField(max_length=8, unique=True)),
            ],
            bases=(magic_cards.models.NameMixin, models.Model),
        ),
        migrations.AddField(
            model_name='printing',
            name='set',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='printings', to='magic_cards.Set'),
        ),
        migrations.AddField(
            model_name='card',
            name='subtypes',
            field=models.ManyToManyField(to='magic_cards.CardSubtype'),
        ),
        migrations.AddField(
            model_name='card',
            name='supertypes',
            field=models.ManyToManyField(to='magic_cards.CardSupertype'),
        ),
        migrations.AddField(
            model_name='card',
            name='types',
            field=models.ManyToManyField(to='magic_cards.CardType'),
        ),
    ]
