# -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-05-05 19:16
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),
        ('questions', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Comic',
            fields=[
                ('marvel_id', models.IntegerField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=255)),
                ('issue_number', models.PositiveIntegerField(default=0)),
                ('description', models.CharField(default=b'', max_length=1000)),
                ('upc', models.CharField(max_length=50, null=True)),
                ('page_count', models.IntegerField(null=True)),
                ('_format', models.CharField(max_length=50, null=True)),
                ('detail_url', models.URLField(max_length=255, null=True)),
                ('series', models.CharField(max_length=500, null=True)),
                ('purchase_url', models.URLField(max_length=255, null=True)),
                ('purchase_date', models.DateTimeField(null=True)),
                ('str_pur_date', models.CharField(max_length=15, null=True)),
                ('read', models.BooleanField(default=False)),
                ('thumbnail', models.CharField(blank=True, max_length=300)),
                ('characters', models.ManyToManyField(related_name='comics', to='questions.Character')),
            ],
        ),
        migrations.CreateModel(
            name='Membership',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('read', models.BooleanField(default=False)),
                ('comic', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='m_comics.Comic')),
            ],
        ),
        migrations.CreateModel(
            name='ReadingList',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('last_modified', models.DateTimeField(auto_now=True)),
                ('comics', models.ManyToManyField(through='m_comics.Membership', to='m_comics.Comic')),
                ('owner', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='readinglist', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='membership',
            name='readinglist',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='m_comics.ReadingList'),
        ),
    ]
