# Generated by Django 2.2.1 on 2019-05-23 19:01

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Book',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=120)),
                ('author', models.CharField(max_length=50)),
            ],
            options={
                'unique_together': {('title', 'author')},
            },
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
            ],
            options={
                'unique_together': {('name',)},
            },
        ),
        migrations.CreateModel(
            name='UserAndBook',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('userDescription', models.TextField()),
                ('bookID', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='library.Book')),
                ('userID', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='library.User')),
            ],
            options={
                'unique_together': {('userID', 'bookID')},
            },
        ),
    ]
