# Generated by Django 2.2.2 on 2019-06-23 18:31

from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    dependencies = [
        ('toshokan', '0006_kanjicompound'),
        ('base', '0005_auto_20190621_0708'),
    ]

    operations = [
        migrations.CreateModel(
            name='KanjiGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('date_time', models.DateTimeField(default=django.utils.timezone.now)),
            ],
        ),
        migrations.AlterField(
            model_name='kanjicomment',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comment_profile', to='base.UserProfile'),
        ),
        migrations.CreateModel(
            name='KanjiGroupElement',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_time', models.DateTimeField(default=django.utils.timezone.now)),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='base.KanjiGroup')),
                ('kanji', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='toshokan.Kanji')),
            ],
        ),
        migrations.AddField(
            model_name='kanjigroup',
            name='group_kanji',
            field=models.ManyToManyField(blank=True, related_name='group_kanji', through='base.KanjiGroupElement', to='toshokan.Kanji'),
        ),
        migrations.AddField(
            model_name='kanjigroup',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='group_profile', to='base.UserProfile'),
        ),
    ]
