# Generated by Django 3.1.6 on 2021-02-09 17:58

import datetime
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('api', '0001_initial'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='movie',
            name='rating',
        ),
        migrations.AddField(
            model_name='movie',
            name='description',
            field=models.TextField(default='Description is empty'),
        ),
        migrations.AddField(
            model_name='movie',
            name='release_date',
            field=models.DateField(default=datetime.datetime(2021, 2, 9, 17, 58, 44, 346702)),
        ),
        migrations.AlterField(
            model_name='genre',
            name='movies',
            field=models.ManyToManyField(blank=True, to='api.Movie'),
        ),
        migrations.AlterField(
            model_name='genre',
            name='name',
            field=models.CharField(max_length=50, unique=True),
        ),
        migrations.AlterField(
            model_name='movie',
            name='title',
            field=models.CharField(max_length=200, unique=True),
        ),
        migrations.CreateModel(
            name='MovieRating',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rating', models.IntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(5)])),
                ('movie', models.OneToOneField(null=True, on_delete=django.db.models.deletion.SET_NULL, to='api.movie')),
                ('user', models.OneToOneField(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
