<reponame>JORIM1981/Flash-Cards
# Generated by Django 3.0.8 on 2020-07-15 13:19

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('flashcards', '0003_auto_20200715_1551'),
    ]

    operations = [
        migrations.CreateModel(
            name='Card',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('question', models.CharField(max_length=200)),
                ('answer', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Deck',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('subject', models.CharField(max_length=200)),
                ('description', models.TextField(blank=True, max_length=500)),
                ('creator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='creator', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='LeitnerBox',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('frequency', models.SmallIntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='ScoreBoard',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('updated', models.DateField()),
                ('leitner_date', models.DateField()),
                ('box', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='flashcards.LeitnerBox')),
                ('card', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='flashcards.Card')),
            ],
        ),
        migrations.CreateModel(
            name='StudentDeck',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('deck', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='flashcards.Deck')),
                ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.RemoveField(
            model_name='studyset',
            name='is_private',
        ),
        migrations.RemoveField(
            model_name='studyset',
            name='title',
        ),
        migrations.RemoveField(
            model_name='studyset',
            name='user',
        ),
        migrations.AddField(
            model_name='studyset',
            name='student',
            field=models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, related_name='student', to=settings.AUTH_USER_MODEL),
        ),
        migrations.DeleteModel(
            name='NoteCard',
        ),
        migrations.AddField(
            model_name='studentdeck',
            name='studyset',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='studyset', to='flashcards.StudySet'),
        ),
        migrations.AddField(
            model_name='scoreboard',
            name='student',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='flashcards.StudySet'),
        ),
        migrations.AddField(
            model_name='card',
            name='deck',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='flashcards.Deck'),
        ),
    ]

# Generated by Django 3.0.8 on 2020-07-15 13:19

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('flashcards', '0003_auto_20200715_1551'),
    ]

    operations = [
        migrations.CreateModel(
            name='Card',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('question', models.CharField(max_length=200)),
                ('answer', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Deck',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('subject', models.CharField(max_length=200)),
                ('description', models.TextField(blank=True, max_length=500)),
                ('creator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='creator', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='LeitnerBox',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('frequency', models.SmallIntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='ScoreBoard',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('updated', models.DateField()),
                ('leitner_date', models.DateField()),
                ('box', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='flashcards.LeitnerBox')),
                ('card', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='flashcards.Card')),
            ],
        ),
        migrations.CreateModel(
            name='StudentDeck',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('deck', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='flashcards.Deck')),
                ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.RemoveField(
            model_name='studyset',
            name='is_private',
        ),
        migrations.RemoveField(
            model_name='studyset',
            name='title',
        ),
        migrations.RemoveField(
            model_name='studyset',
            name='user',
        ),
        migrations.AddField(
            model_name='studyset',
            name='student',
            field=models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, related_name='student', to=settings.AUTH_USER_MODEL),
        ),
        migrations.DeleteModel(
            name='NoteCard',
        ),
        migrations.AddField(
            model_name='studentdeck',
            name='studyset',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='studyset', to='flashcards.StudySet'),
        ),
        migrations.AddField(
            model_name='scoreboard',
            name='student',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='flashcards.StudySet'),
        ),
        migrations.AddField(
            model_name='card',
            name='deck',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='flashcards.Deck'),
        ),
    ]
# Generated by Django 3.0.8 on 2020-07-15 13:19