# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-11-03 04:59
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='album',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('album_name', models.CharField(max_length=64)),
                ('year', models.DecimalField(decimal_places=0, max_digits=4)),
            ],
        ),
        migrations.CreateModel(
            name='artist',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=64)),
                ('description', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='music_entry',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('order_in_playlist', models.PositiveSmallIntegerField()),
                ('rating', models.DecimalField(choices=[(0, '1'), (1, '2'), (2, '3'), (3, '4'), (4, '5'), (5, '6'), (6, '7'), (7, '8'), (8, '9'), (9, '10')], decimal_places=0, max_digits=1)),
            ],
        ),
        migrations.CreateModel(
            name='music_playlist',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('playlist_name', models.CharField(max_length=32)),
                ('is_public', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='song',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('song_name', models.TextField()),
                ('genre', models.CharField(max_length=128)),
                ('song_length', models.PositiveIntegerField(default=0, null=True)),
                ('lyrics', models.TextField(null=True)),
                ('album', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.album')),
                ('artist', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.artist')),
            ],
        ),
        migrations.CreateModel(
            name='tag',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=32)),
                ('tag', models.ManyToManyField(to='core.music_entry')),
            ],
        ),
        migrations.CreateModel(
            name='user_account',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('first_name', models.CharField(max_length=64)),
                ('last_name', models.CharField(max_length=64)),
                ('email', models.CharField(max_length=64)),
            ],
        ),
        migrations.AddField(
            model_name='music_playlist',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.user_account'),
        ),
        migrations.AddField(
            model_name='music_entry',
            name='playlist',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.music_playlist'),
        ),
        migrations.AddField(
            model_name='music_entry',
            name='song',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.song'),
        ),
        migrations.AddField(
            model_name='album',
            name='artist',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.artist'),
        ),
    ]
