# Generated by Django 3.1 on 2021-03-12 17:02

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Genre',
            fields=[
                ('image', models.ImageField(upload_to='genre_image')),
                ('slug', models.SlugField(max_length=100, primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=100, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Movie',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('description', models.TextField()),
                ('premiere', models.DateTimeField(auto_now=True)),
                ('budget', models.PositiveIntegerField()),
                ('poster', models.ImageField(upload_to='poster')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('movie', models.FileField(upload_to='movie')),
                ('genre', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='movies', to='main.genre')),
            ],
            options={
                'ordering': ('-created',),
            },
        ),
        migrations.CreateModel(
            name='Rating',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rating', models.PositiveSmallIntegerField()),
                ('movie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ratings', to='main.movie')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ratings', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='MovieImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(upload_to='movie_image')),
                ('movie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', to='main.movie')),
            ],
        ),
        migrations.CreateModel(
            name='Like',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('like', models.BooleanField(default=False)),
                ('movie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='likes', to='main.movie')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='likes', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Favorite',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('favorite', models.BooleanField(default=False)),
                ('movie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='favorites', to='main.movie')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='favorites', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField()),
                ('created', models.DateTimeField(auto_now=True)),
                ('movie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='main.movie')),
                ('parent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='children', to='main.comment')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ('-created',),
            },
        ),
        migrations.CreateModel(
            name='Actor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('full_name', models.CharField(max_length=100)),
                ('image', models.ImageField(blank=True, null=True, upload_to='actors')),
                ('movie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='actors', to='main.movie')),
            ],
        ),
    ]

2df3cdf98901b4ff4a1b9576027bbc07546aab0e
<mask token>

<mask token>


class Migration(migrations.Migration):
    <mask token>
    <mask token>
    <mask token>

<mask token>


class Migration(migrations.Migration):
    initial = True
    dependencies = [migrations.swappable_dependency(settings.AUTH_USER_MODEL)]
    operations = [migrations.CreateModel(name='Genre', fields=[('image',
        models.ImageField(upload_to='genre_image')), ('slug', models.
        SlugField(max_length=100, primary_key=True, serialize=False)), (
        'title', models.CharField(max_length=100, unique=True))]),
        migrations.CreateModel(name='Movie', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('title', models.CharField(max_length=200)), (
        'description', models.TextField()), ('premiere', models.
        DateTimeField(auto_now=True)), ('budget', models.
        PositiveIntegerField()), ('poster', models.ImageField(upload_to=
        'poster')), ('created', models.DateTimeField(auto_now_add=True)), (
        'movie', models.FileField(upload_to='movie')), ('genre', models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE,
        related_name='movies', to='main.genre'))], options={'ordering': (
        '-created',)}), migrations.CreateModel(name='Rating', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('rating', models.
        PositiveSmallIntegerField()), ('movie', models.ForeignKey(on_delete
        =django.db.models.deletion.CASCADE, related_name='ratings', to=
        'main.movie')), ('user', models.ForeignKey(on_delete=django.db.
        models.deletion.CASCADE, related_name='ratings', to=settings.
        AUTH_USER_MODEL))]), migrations.CreateModel(name='MovieImage',
        fields=[('id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('image', models.ImageField(
        upload_to='movie_image')), ('movie', models.ForeignKey(on_delete=
        django.db.models.deletion.CASCADE, related_name='images', to=
        'main.movie'))]), migrations.CreateModel(name='Like', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('like', models.BooleanField(default=
        False)), ('movie', models.ForeignKey(on_delete=django.db.models.
        deletion.CASCADE, related_name='likes', to='main.movie')), ('user',
        models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
        related_name='likes', to=settings.AUTH_USER_MODEL))]), migrations.
        CreateModel(name='Favorite', fields=[('id', models.AutoField(
        auto_created=True, primary_key=True, serialize=False, verbose_name=
        'ID')), ('favorite', models.BooleanField(default=False)), ('movie',
        models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
        related_name='favorites', to='main.movie')), ('user', models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE,
        related_name='favorites', to=settings.AUTH_USER_MODEL))]),
        migrations.CreateModel(name='Comment', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('text', models.TextField()), ('created',
        models.DateTimeField(auto_now=True)), ('movie', models.ForeignKey(
        on_delete=django.db.models.deletion.CASCADE, related_name=
        'comments', to='main.movie')), ('parent', models.ForeignKey(
        on_delete=django.db.models.deletion.CASCADE, related_name=
        'children', to='main.comment')), ('user', models.ForeignKey(
        on_delete=django.db.models.deletion.CASCADE, related_name=
        'comments', to=settings.AUTH_USER_MODEL))], options={'ordering': (
        '-created',)}), migrations.CreateModel(name='Actor', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('full_name', models.CharField(
        max_length=100)), ('image', models.ImageField(blank=True, null=True,
        upload_to='actors')), ('movie', models.ForeignKey(on_delete=django.
        db.models.deletion.CASCADE, related_name='actors', to='main.movie'))])]

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


class Migration(migrations.Migration):
    initial = True
    dependencies = [migrations.swappable_dependency(settings.AUTH_USER_MODEL)]
    operations = [migrations.CreateModel(name='Genre', fields=[('image',
        models.ImageField(upload_to='genre_image')), ('slug', models.
        SlugField(max_length=100, primary_key=True, serialize=False)), (
        'title', models.CharField(max_length=100, unique=True))]),
        migrations.CreateModel(name='Movie', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('title', models.CharField(max_length=200)), (
        'description', models.TextField()), ('premiere', models.
        DateTimeField(auto_now=True)), ('budget', models.
        PositiveIntegerField()), ('poster', models.ImageField(upload_to=
        'poster')), ('created', models.DateTimeField(auto_now_add=True)), (
        'movie', models.FileField(upload_to='movie')), ('genre', models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE,
        related_name='movies', to='main.genre'))], options={'ordering': (
        '-created',)}), migrations.CreateModel(name='Rating', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('rating', models.
        PositiveSmallIntegerField()), ('movie', models.ForeignKey(on_delete
        =django.db.models.deletion.CASCADE, related_name='ratings', to=
        'main.movie')), ('user', models.ForeignKey(on_delete=django.db.
        models.deletion.CASCADE, related_name='ratings', to=settings.
        AUTH_USER_MODEL))]), migrations.CreateModel(name='MovieImage',
        fields=[('id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('image', models.ImageField(
        upload_to='movie_image')), ('movie', models.ForeignKey(on_delete=
        django.db.models.deletion.CASCADE, related_name='images', to=
        'main.movie'))]), migrations.CreateModel(name='Like', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('like', models.BooleanField(default=
        False)), ('movie', models.ForeignKey(on_delete=django.db.models.
        deletion.CASCADE, related_name='likes', to='main.movie')), ('user',
        models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
        related_name='likes', to=settings.AUTH_USER_MODEL))]), migrations.
        CreateModel(name='Favorite', fields=[('id', models.AutoField(
        auto_created=True, primary_key=True, serialize=False, verbose_name=
        'ID')), ('favorite', models.BooleanField(default=False)), ('movie',
        models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
        related_name='favorites', to='main.movie')), ('user', models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE,
        related_name='favorites', to=settings.AUTH_USER_MODEL))]),
        migrations.CreateModel(name='Comment', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('text', models.TextField()), ('created',
        models.DateTimeField(auto_now=True)), ('movie', models.ForeignKey(
        on_delete=django.db.models.deletion.CASCADE, related_name=
        'comments', to='main.movie')), ('parent', models.ForeignKey(
        on_delete=django.db.models.deletion.CASCADE, related_name=
        'children', to='main.comment')), ('user', models.ForeignKey(
        on_delete=django.db.models.deletion.CASCADE, related_name=
        'comments', to=settings.AUTH_USER_MODEL))], options={'ordering': (
        '-created',)}), migrations.CreateModel(name='Actor', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('full_name', models.CharField(
        max_length=100)), ('image', models.ImageField(blank=True, null=True,
        upload_to='actors')), ('movie', models.ForeignKey(on_delete=django.
        db.models.deletion.CASCADE, related_name='actors', to='main.movie'))])]

# Generated by Django 3.1 on 2021-03-12 17:02

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Genre',
            fields=[
                ('image', models.ImageField(upload_to='genre_image')),
                ('slug', models.SlugField(max_length=100, primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=100, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Movie',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('description', models.TextField()),
                ('premiere', models.DateTimeField(auto_now=True)),
                ('budget', models.PositiveIntegerField()),
                ('poster', models.ImageField(upload_to='poster')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('movie', models.FileField(upload_to='movie')),
                ('genre', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='movies', to='main.genre')),
            ],
            options={
                'ordering': ('-created',),
            },
        ),
        migrations.CreateModel(
            name='Rating',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rating', models.PositiveSmallIntegerField()),
                ('movie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ratings', to='main.movie')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ratings', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='MovieImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(upload_to='movie_image')),
                ('movie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', to='main.movie')),
            ],
        ),
        migrations.CreateModel(
            name='Like',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('like', models.BooleanField(default=False)),
                ('movie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='likes', to='main.movie')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='likes', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Favorite',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('favorite', models.BooleanField(default=False)),
                ('movie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='favorites', to='main.movie')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='favorites', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField()),
                ('created', models.DateTimeField(auto_now=True)),
                ('movie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='main.movie')),
                ('parent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='children', to='main.comment')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ('-created',),
            },
        ),
        migrations.CreateModel(
            name='Actor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('full_name', models.CharField(max_length=100)),
                ('image', models.ImageField(blank=True, null=True, upload_to='actors')),
                ('movie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='actors', to='main.movie')),
            ],
        ),
    ]
