diff --git a/cinema/migrations/0001_initial.py b/cinema/migrations/0001_initial.py index fc45afb77..514947a64 100644 --- a/cinema/migrations/0001_initial.py +++ b/cinema/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 4.1 on 2024-09-25 18:17 +# Generated by Django 4.0.2 on 2022-05-03 13:41 from django.db import migrations, models @@ -10,54 +10,6 @@ class Migration(migrations.Migration): dependencies = [] operations = [ - migrations.CreateModel( - name="Actor", - fields=[ - ( - "id", - models.BigAutoField( - auto_created=True, - primary_key=True, - serialize=False, - verbose_name="ID", - ), - ), - ("first_name", models.CharField(max_length=255)), - ("last_name", models.CharField(max_length=255)), - ], - ), - migrations.CreateModel( - name="CinemaHall", - fields=[ - ( - "id", - models.BigAutoField( - auto_created=True, - primary_key=True, - serialize=False, - verbose_name="ID", - ), - ), - ("name", models.CharField(max_length=255)), - ("rows", models.IntegerField()), - ("seats_in_row", models.IntegerField()), - ], - ), - migrations.CreateModel( - name="Genre", - fields=[ - ( - "id", - models.BigAutoField( - auto_created=True, - primary_key=True, - serialize=False, - verbose_name="ID", - ), - ), - ("name", models.CharField(max_length=255, unique=True)), - ], - ), migrations.CreateModel( name="Movie", fields=[ @@ -73,14 +25,6 @@ class Migration(migrations.Migration): ("title", models.CharField(max_length=255)), ("description", models.TextField()), ("duration", models.IntegerField()), - ( - "actors", - models.ManyToManyField(related_name="movie", to="cinema.actor"), - ), - ( - "genres", - models.ManyToManyField(related_name="movie", to="cinema.genre"), - ), ], ), ] diff --git a/cinema/migrations/0002_actor_cinemahall_genre_movie_actors_movie_genres.py b/cinema/migrations/0002_actor_cinemahall_genre_movie_actors_movie_genres.py new file mode 100644 index 000000000..86e41636a --- /dev/null +++ b/cinema/migrations/0002_actor_cinemahall_genre_movie_actors_movie_genres.py @@ -0,0 +1,71 @@ +# Generated by Django 4.1 on 2024-09-25 19:10 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("cinema", "0001_initial"), + ] + + operations = [ + migrations.CreateModel( + name="Actor", + fields=[ + ( + "id", + models.BigAutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("first_name", models.CharField(max_length=255)), + ("last_name", models.CharField(max_length=255)), + ], + ), + migrations.CreateModel( + name="CinemaHall", + fields=[ + ( + "id", + models.BigAutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("name", models.CharField(max_length=255)), + ("rows", models.IntegerField()), + ("seats_in_row", models.IntegerField()), + ], + ), + migrations.CreateModel( + name="Genre", + fields=[ + ( + "id", + models.BigAutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("name", models.CharField(max_length=255, unique=True)), + ], + ), + migrations.AddField( + model_name="movie", + name="actors", + field=models.ManyToManyField(related_name="movies", to="cinema.actor"), + ), + migrations.AddField( + model_name="movie", + name="genres", + field=models.ManyToManyField(related_name="movies", to="cinema.genre"), + ), + ]