text: # Generated by Django 3.1.4 on 2020-12-13 18:42
  
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
      ]
  
      operations = [
          migrations.CreateModel(
              name='Company',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=200, unique=True, verbose_name='production company name')),
              ],
          ),
          migrations.CreateModel(
              name='Contributor',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=200, unique=True, verbose_name='contributor full name')),
              ],
          ),
          migrations.CreateModel(
              name='Country',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=200, unique=True, verbose_name='country name')),
              ],
          ),
          migrations.CreateModel(
              name='Genre',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=200, unique=True, verbose_name='genre of the movie')),
              ],
          ),
          migrations.CreateModel(
              name='Language',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=200, unique=True, verbose_name='language name')),
              ],
          ),
          migrations.CreateModel(
              name='Movie',
              fields=[
                  ('id', models.BigIntegerField(primary_key=True, serialize=False, verbose_name='imdb title id')),
                  ('title', models.CharField(max_length=255, verbose_name='movie title')),
                  ('original_title', models.CharField(max_length=255, verbose_name='original movie title')),
                  ('year', models.IntegerField(verbose_name='movie year')),
                  ('date_published', models.DateField(verbose_name='movie publishing date')),
                  ('duration', models.IntegerField(verbose_name='movie duration')),
                  ('description', models.TextField(blank=True, verbose_name='movie short description')),
                  ('long_description', models.TextField(blank=True, verbose_name='movie long description')),
                  ('avg_vote', models.DecimalField(decimal_places=1, max_digits=3, verbose_name='average user vote')),
                  ('imdb_score', models.DecimalField(decimal_places=1, max_digits=3, verbose_name='movie imdb score')),
                  ('metascore', models.DecimalField(decimal_places=1, max_digits=3, null=True, verbose_name='movie metascore')),
                  ('votes', models.IntegerField(verbose_name='number of votes')),
                  ('budget', models.BigIntegerField(null=True, verbose_name='movie budget')),
                  ('budget_currency', models.CharField(max_length=5, null=True, verbose_name='movie budget currency')),
                  ('usa_gross_income', models.BigIntegerField(null=True, verbose_name='movie gross income in the usa')),
                  ('worldwide_gross_income', models.BigIntegerField(null=True, verbose_name='movie gross income worldwide')),
                  ('reviews_from_users', models.IntegerField(null=True, verbose_name='number of reviews from users')),
                  ('reviews_from_critics', models.IntegerField(null=True, verbose_name='number of reviews from critics')),
                  ('image_url', models.URLField(null=True, verbose_name='poster image url')),
              ],
          ),
          migrations.CreateModel(
              name='Rating',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=200, unique=True, verbose_name='rating name')),
              ],
          ),
          migrations.CreateModel(
              name='MovieWriter',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('position', models.IntegerField(null=True, verbose_name='position in the directors list')),
                  ('movie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='moviewriters', to='movies.movie')),
                  ('writer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='writermovies', to='movies.contributor')),
              ],
          ),
          migrations.CreateModel(
              name='MovieDirector',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('position', models.IntegerField(null=True, verbose_name='position in the directors list')),
                  ('director', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='directormovies', to='movies.contributor')),
                  ('movie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='moviedirectors', to='movies.movie')),
              ],
          ),
          migrations.CreateModel(
              name='MovieActor',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('position', models.IntegerField(null=True, verbose_name='position in the directors list')),
                  ('actor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='movieactors', to='movies.contributor')),
                  ('movie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='movieactors', to='movies.movie')),
              ],
          ),
          migrations.AddField(
              model_name='movie',
              name='actors',
              field=models.ManyToManyField(related_name='movies_as_actor', through='movies.MovieActor', to='movies.Contributor'),
          ),
          migrations.AddField(
              model_name='movie',
              name='company',
              field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='movies', to='movies.company'),
          ),
          migrations.AddField(
              model_name='movie',
              name='countries',
              field=models.ManyToManyField(related_name='movies', to='movies.Country'),
          ),
          migrations.AddField(
              model_name='movie',
              name='directors',
              field=models.ManyToManyField(related_name='movies_as_director', through='movies.MovieDirector', to='movies.Contributor'),
          ),
          migrations.AddField(
              model_name='movie',
              name='genres',
              field=models.ManyToManyField(related_name='movies', to='movies.Genre'),
          ),
          migrations.AddField(
              model_name='movie',
              name='languages',
              field=models.ManyToManyField(related_name='movies', to='movies.Language'),
          ),
          migrations.AddField(
              model_name='movie',
              name='rated',
              field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='movies', to='movies.rating'),
          ),
          migrations.AddField(
              model_name='movie',
              name='writers',
              field=models.ManyToManyField(related_name='movies_as_writer', through='movies.MovieWriter', to='movies.Contributor'),
          ),
      ]
  