# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-10 21:15
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='Board',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30)),
                ('votes_count_threshold', models.PositiveSmallIntegerField(default=1)),
                ('admin', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='boards', to=settings.AUTH_USER_MODEL)),
                ('members', models.ManyToManyField(related_name='shared_boards', to=settings.AUTH_USER_MODEL)),
                ('moderators', models.ManyToManyField(related_name='moderated_boards', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='List',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('board', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='boards.Board')),
            ],
        ),
        migrations.CreateModel(
            name='Song',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('link', models.URLField()),
                ('description', models.TextField(blank=True, max_length=2000, null=True)),
                ('poster', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='posted_songs', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='list',
            name='song',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='boards.Song'),
        ),
        migrations.AddField(
            model_name='board',
            name='proposed_songs',
            field=models.ManyToManyField(through='boards.List', to='boards.Song'),
        ),
    ]
