From 8a756867dada1a94c3b405ea726a83801c474a41 Mon Sep 17 00:00:00 2001 From: maxim-lixakov Date: Sat, 18 Nov 2023 14:06:23 +0300 Subject: [PATCH] update django models --- app/main/migrations/0001_initial.py | 26 +++++++++++++------------- app/main/models.py | 24 ++++++++++++------------ 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/app/main/migrations/0001_initial.py b/app/main/migrations/0001_initial.py index 732aeaa..7bfb27c 100644 --- a/app/main/migrations/0001_initial.py +++ b/app/main/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 4.2.7 on 2023-11-11 09:48 +# Generated by Django 4.2.7 on 2023-11-18 08:58 from django.db import migrations, models import django.db.models.deletion @@ -23,7 +23,7 @@ class Migration(migrations.Migration): ('contact_number', models.CharField(max_length=12)), ], options={ - 'db_table': 'Cinema', + 'db_table': 'cinema', 'managed': False, }, ), @@ -34,7 +34,7 @@ class Migration(migrations.Migration): ('country_id', models.IntegerField(primary_key=True, serialize=False)), ], options={ - 'db_table': 'Country', + 'db_table': 'country', 'managed': False, }, ), @@ -48,7 +48,7 @@ class Migration(migrations.Migration): ('email', models.CharField(blank=True, max_length=50, null=True)), ], options={ - 'db_table': 'Customer', + 'db_table': 'customer', 'managed': False, }, ), @@ -61,7 +61,7 @@ class Migration(migrations.Migration): ('base_price', models.FloatField()), ], options={ - 'db_table': 'Film', + 'db_table': 'film', 'managed': False, }, ), @@ -72,7 +72,7 @@ class Migration(migrations.Migration): ('name', models.CharField(max_length=30)), ], options={ - 'db_table': 'Genre', + 'db_table': 'genre', 'managed': False, }, ), @@ -83,7 +83,7 @@ class Migration(migrations.Migration): ('seating_capacity', models.IntegerField()), ], options={ - 'db_table': 'Hall', + 'db_table': 'hall', 'managed': False, }, ), @@ -96,7 +96,7 @@ class Migration(migrations.Migration): ('class_coefficient', models.FloatField()), ], options={ - 'db_table': 'Seat', + 'db_table': 'seat', 'managed': False, }, ), @@ -112,7 +112,7 @@ class Migration(migrations.Migration): ('status', models.CharField(max_length=30)), ], options={ - 'db_table': 'Seller', + 'db_table': 'seller', 'managed': False, }, ), @@ -124,7 +124,7 @@ class Migration(migrations.Migration): ('end_time', models.DateTimeField()), ], options={ - 'db_table': 'Showtime', + 'db_table': 'showtime', 'managed': False, }, ), @@ -137,7 +137,7 @@ class Migration(migrations.Migration): ('status', models.CharField(max_length=30)), ], options={ - 'db_table': 'Ticket', + 'db_table': 'ticket', 'managed': False, }, ), @@ -147,7 +147,7 @@ class Migration(migrations.Migration): ('film', models.OneToOneField(on_delete=django.db.models.deletion.DO_NOTHING, primary_key=True, serialize=False, to='main.film')), ], options={ - 'db_table': 'Film_genre', + 'db_table': 'film_genre', 'managed': False, }, ), @@ -157,7 +157,7 @@ class Migration(migrations.Migration): ('film', models.OneToOneField(on_delete=django.db.models.deletion.DO_NOTHING, primary_key=True, serialize=False, to='main.film')), ], options={ - 'db_table': 'Production_country', + 'db_table': 'production_country', 'managed': False, }, ), diff --git a/app/main/models.py b/app/main/models.py index f187735..f62c0a8 100644 --- a/app/main/models.py +++ b/app/main/models.py @@ -18,7 +18,7 @@ class Cinema(models.Model): class Meta: managed = False - db_table = 'Cinema' + db_table = 'cinema' class Country(models.Model): @@ -27,7 +27,7 @@ class Country(models.Model): class Meta: managed = False - db_table = 'Country' + db_table = 'country' class Customer(models.Model): @@ -39,7 +39,7 @@ class Customer(models.Model): class Meta: managed = False - db_table = 'Customer' + db_table = 'customer' class Film(models.Model): @@ -50,7 +50,7 @@ class Film(models.Model): class Meta: managed = False - db_table = 'Film' + db_table = 'film' class FilmGenre(models.Model): @@ -59,7 +59,7 @@ class FilmGenre(models.Model): class Meta: managed = False - db_table = 'Film_genre' + db_table = 'film_genre' unique_together = (('film', 'genre'),) @@ -69,7 +69,7 @@ class Genre(models.Model): class Meta: managed = False - db_table = 'Genre' + db_table = 'genre' class Hall(models.Model): @@ -79,7 +79,7 @@ class Hall(models.Model): class Meta: managed = False - db_table = 'Hall' + db_table = 'hall' class ProductionCountry(models.Model): @@ -88,7 +88,7 @@ class ProductionCountry(models.Model): class Meta: managed = False - db_table = 'Production_country' + db_table = 'production_country' unique_together = (('film', 'country'),) @@ -101,7 +101,7 @@ class Seat(models.Model): class Meta: managed = False - db_table = 'Seat' + db_table = 'seat' class Seller(models.Model): @@ -116,7 +116,7 @@ class Seller(models.Model): class Meta: managed = False - db_table = 'Seller' + db_table = 'seller' class Showtime(models.Model): @@ -128,7 +128,7 @@ class Showtime(models.Model): class Meta: managed = False - db_table = 'Showtime' + db_table = 'showtime' class Ticket(models.Model): @@ -143,4 +143,4 @@ class Ticket(models.Model): class Meta: managed = False - db_table = 'Ticket' + db_table = 'ticket'