From 84a4bf6f87312724e900821409eb0a2c52f5a208 Mon Sep 17 00:00:00 2001 From: Konstantin Raikhert Date: Thu, 7 Sep 2023 10:38:41 +0300 Subject: [PATCH] collapse migrations --- src/bot/migrations/0001_initial.py | 76 +++++++-- .../0002_alter_coordinator_phone_number.py | 30 ---- ...3_alter_coordinator_first_name_and_more.py | 153 ------------------ ...oordinator_options_coordinator_is_chief.py | 33 ---- ...lter_coordinator_email_address_and_more.py | 50 ------ ..._fundprogram_short_description_and_more.py | 36 ----- .../0007_alter_question_short_description.py | 23 --- ...alter_coordinator_phone_number_and_more.py | 49 ------ src/bot_settings/migrations/0001_initial.py | 21 ++- ...s_title_alter_botsettings_type_and_more.py | 46 ------ src/core/migrations/0001_initial.py | 14 +- .../0002_alter_region_region_name.py | 24 --- .../0003_alter_region_region_name.py | 24 --- src/users/migrations/0001_initial.py | 26 +-- ...002_remove_user_region_remove_user_role.py | 22 --- 15 files changed, 89 insertions(+), 538 deletions(-) delete mode 100644 src/bot/migrations/0002_alter_coordinator_phone_number.py delete mode 100644 src/bot/migrations/0003_alter_coordinator_first_name_and_more.py delete mode 100644 src/bot/migrations/0004_alter_coordinator_options_coordinator_is_chief.py delete mode 100644 src/bot/migrations/0005_alter_coordinator_email_address_and_more.py delete mode 100644 src/bot/migrations/0006_alter_fundprogram_short_description_and_more.py delete mode 100644 src/bot/migrations/0007_alter_question_short_description.py delete mode 100644 src/bot/migrations/0008_alter_coordinator_phone_number_and_more.py delete mode 100644 src/bot_settings/migrations/0003_alter_botsettings_title_alter_botsettings_type_and_more.py delete mode 100644 src/core/migrations/0002_alter_region_region_name.py delete mode 100644 src/core/migrations/0003_alter_region_region_name.py delete mode 100644 src/users/migrations/0002_remove_user_region_remove_user_role.py diff --git a/src/bot/migrations/0001_initial.py b/src/bot/migrations/0001_initial.py index 945270ab..595c8196 100644 --- a/src/bot/migrations/0001_initial.py +++ b/src/bot/migrations/0001_initial.py @@ -1,11 +1,16 @@ -# Generated by Django 4.2.3 on 2023-08-22 05:21 +# Generated by Django 4.2.4 on 2023-09-07 07:14 +import ckeditor.fields import django.core.validators import django.db.models.deletion from django.db import migrations, models +import bot.validators + class Migration(migrations.Migration): + """Migrations for bot.""" + initial = True dependencies = [ @@ -20,15 +25,24 @@ class Migration(migrations.Migration): ("updated_at", models.DateTimeField(auto_now=True)), ( "first_name", - models.CharField(max_length=200, verbose_name="Имя"), + models.CharField( + help_text="Введите имя регионального координатора", + max_length=200, + verbose_name="Имя", + ), ), ( "last_name", - models.CharField(max_length=200, verbose_name="Фамилия"), + models.CharField( + help_text="Введите фамилию регионального координатора", + max_length=200, + verbose_name="Фамилия", + ), ), ( "region", models.OneToOneField( + help_text="Выберите регион из списка", on_delete=django.db.models.deletion.PROTECT, primary_key=True, related_name="coordinators", @@ -40,19 +54,22 @@ class Migration(migrations.Migration): ( "email_address", models.EmailField( - max_length=254, unique=True, verbose_name="Email" + help_text="Введите адрес электронной почты", + max_length=254, + unique=True, + verbose_name="Email", ), ), ( "phone_number", models.CharField( blank=True, + help_text="Введите номер телефона регионального координатора", max_length=20, null=True, - unique=True, validators=[ django.core.validators.RegexValidator( - message="Введите номер телефона в формате: +7 777 777 77 77", + message="Введите номер телефона в формате: +7 (777) 777-77-77", regex="^[\\+]?[7, 8][-\\s\\.]?[(]?[0-9]{3}[)]?[-\\s\\.]?[0-9]{3}[-\\s\\.]?[0-9]{2}[-\\s\\.]?[0-9]{2}$", ) ], @@ -63,9 +80,9 @@ class Migration(migrations.Migration): "telegram_account", models.CharField( blank=True, + help_text="Введите телеграмм-аккаунт регионального координатора", max_length=32, null=True, - unique=True, validators=[ django.core.validators.RegexValidator( message="Введите название аккаунта telegram в формате: username", @@ -75,11 +92,19 @@ class Migration(migrations.Migration): verbose_name="Telegram", ), ), + ( + "is_chief", + models.BooleanField( + default=False, + validators=[bot.validators.validate_is_chief], + verbose_name="Главный", + ), + ), ], options={ "verbose_name": "Координатор", "verbose_name_plural": "Координаторы", - "ordering": ("last_name",), + "ordering": ("-is_chief", "last_name"), }, ), migrations.CreateModel( @@ -110,16 +135,26 @@ class Migration(migrations.Migration): ("updated_at", models.DateTimeField(auto_now=True)), ( "question", - models.CharField(max_length=200, verbose_name="Вопрос"), + models.CharField( + help_text="Введите вопрос, не более 200 символов", + max_length=200, + verbose_name="Вопрос", + ), ), ( "answer", - models.CharField(max_length=3856, verbose_name="Ответ"), + ckeditor.fields.RichTextField( + help_text="Введите ответ на вопрос, не более 3896 символов", + max_length=3896, + verbose_name="Ответ", + ), ), ( "short_description", models.CharField( - max_length=20, verbose_name="Короткое описание" + help_text="Введите название кнопки в боте для данного вопроса", + max_length=20, + verbose_name="Текст на кнопке", ), ), ( @@ -132,9 +167,9 @@ class Migration(migrations.Migration): "PSYCHOLOGICAL_ASSISTANCE", "Психологическая помощь", ), - ("COMMON_QUESTION", "Общий вопрос"), ], default="LEGAL_ASSISTANCE", + help_text="Выберите тип помощи для вопроса", max_length=100, verbose_name="Тип вопроса", ), @@ -143,6 +178,7 @@ class Migration(migrations.Migration): "regions", models.ManyToManyField( blank=True, + help_text="Выберите регион(ы) для вопроса", related_name="questions", to="core.region", verbose_name="Регионы", @@ -172,25 +208,33 @@ class Migration(migrations.Migration): ( "title", models.CharField( - max_length=200, unique=True, verbose_name="Название" + help_text="Введите название программы фонда, не более 200 символов", + max_length=200, + unique=True, + verbose_name="Название", ), ), ( "fund_text", - models.TextField( - max_length=4096, verbose_name="Описание программы" + ckeditor.fields.RichTextField( + help_text="Введите описание программы, не более 3896 символов", + max_length=3896, + verbose_name="Описание программы", ), ), ( "short_description", models.CharField( - max_length=20, verbose_name="Короткое описание" + help_text="Введите название кнопки в боте для данной программы", + max_length=20, + verbose_name="Текст на кнопке", ), ), ( "regions", models.ManyToManyField( blank=True, + help_text="Выберите регион(ы) для программы", related_name="programs", to="core.region", verbose_name="Регионы", diff --git a/src/bot/migrations/0002_alter_coordinator_phone_number.py b/src/bot/migrations/0002_alter_coordinator_phone_number.py deleted file mode 100644 index afd95782..00000000 --- a/src/bot/migrations/0002_alter_coordinator_phone_number.py +++ /dev/null @@ -1,30 +0,0 @@ -# Generated by Django 4.2.4 on 2023-08-24 15:37 - -import django.core.validators -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ("bot", "0001_initial"), - ] - - operations = [ - migrations.AlterField( - model_name="coordinator", - name="phone_number", - field=models.CharField( - blank=True, - max_length=20, - null=True, - unique=True, - validators=[ - django.core.validators.RegexValidator( - message="Введите номер телефона в формате: +7 (777) 777-77-77", - regex="^[\\+]?[7, 8][-\\s\\.]?[(]?[0-9]{3}[)]?[-\\s\\.]?[0-9]{3}[-\\s\\.]?[0-9]{2}[-\\s\\.]?[0-9]{2}$", - ) - ], - verbose_name="Номер телефона", - ), - ), - ] diff --git a/src/bot/migrations/0003_alter_coordinator_first_name_and_more.py b/src/bot/migrations/0003_alter_coordinator_first_name_and_more.py deleted file mode 100644 index 309fcf9c..00000000 --- a/src/bot/migrations/0003_alter_coordinator_first_name_and_more.py +++ /dev/null @@ -1,153 +0,0 @@ -# Generated by Django 4.2.4 on 2023-08-28 21:33 - -import ckeditor.fields -import django.core.validators -from django.db import migrations, models - - -class Migration(migrations.Migration): - """Migrations for bot.""" - - dependencies = [ - ("core", "0001_initial"), - ("bot", "0002_alter_coordinator_phone_number"), - ] - - operations = [ - migrations.AlterField( - model_name="coordinator", - name="first_name", - field=models.CharField( - help_text="Введите имя регионального координатора", - max_length=200, - verbose_name="Имя", - ), - ), - migrations.AlterField( - model_name="coordinator", - name="last_name", - field=models.CharField( - help_text="Введите фамилию регионального координатора", - max_length=200, - verbose_name="Фамилия", - ), - ), - migrations.AlterField( - model_name="coordinator", - name="phone_number", - field=models.CharField( - blank=True, - help_text="Введите номер телефона регионального координатора", - max_length=20, - null=True, - unique=True, - validators=[ - django.core.validators.RegexValidator( - message="Введите номер телефона в формате: +7 (777) 777-77-77", - regex="^[\\+]?[7, 8][-\\s\\.]?[(]?[0-9]{3}[)]?[-\\s\\.]?[0-9]{3}[-\\s\\.]?[0-9]{2}[-\\s\\.]?[0-9]{2}$", - ) - ], - verbose_name="Номер телефона", - ), - ), - migrations.AlterField( - model_name="coordinator", - name="telegram_account", - field=models.CharField( - blank=True, - help_text="Введите телеграмм-аккаунт регионального координатора", - max_length=32, - null=True, - unique=True, - validators=[ - django.core.validators.RegexValidator( - message="Введите название аккаунта telegram в формате: username", - regex="^[\\w\\_]{5,32}$", - ) - ], - verbose_name="Telegram", - ), - ), - migrations.AlterField( - model_name="fundprogram", - name="fund_text", - field=ckeditor.fields.RichTextField( - help_text="Введите описание программы, не более 3896 символов", - max_length=3896, - verbose_name="Описание программы", - ), - ), - migrations.AlterField( - model_name="fundprogram", - name="short_description", - field=models.CharField( - help_text="Введите название кнопки в боте для данной программы", - max_length=20, - verbose_name="Короткое описание", - ), - ), - migrations.AlterField( - model_name="fundprogram", - name="title", - field=models.CharField( - help_text="Введите название программы фонда, не более 200 символов", - max_length=200, - unique=True, - verbose_name="Название", - ), - ), - migrations.AlterField( - model_name="question", - name="answer", - field=ckeditor.fields.RichTextField( - help_text="Введите ответ на вопрос, не более 3896 символов", - max_length=3896, - verbose_name="Ответ", - ), - ), - migrations.AlterField( - model_name="question", - name="question", - field=models.CharField( - help_text="Введите вопрос, не более 200 символов", - max_length=200, - verbose_name="Вопрос", - ), - ), - migrations.AlterField( - model_name="question", - name="question_type", - field=models.CharField( - choices=[ - ("LEGAL_ASSISTANCE", "Юридическая помощь"), - ("SOCIAL_ASSISTANCE", "Социальная помощь"), - ("PSYCHOLOGICAL_ASSISTANCE", "Психологическая помощь"), - ("COMMON_QUESTION", "Общий вопрос"), - ], - default="LEGAL_ASSISTANCE", - help_text="Выберите тип помощи для вопроса", - max_length=100, - verbose_name="Тип вопроса", - ), - ), - migrations.AlterField( - model_name="question", - name="regions", - field=models.ManyToManyField( - blank=True, - help_text="Выберите регион(ы) для вопроса", - related_name="questions", - to="core.region", - verbose_name="Регионы", - ), - ), - migrations.AlterField( - model_name="question", - name="short_description", - field=models.CharField( - help_text="Введите название кнопки в боте для данного вопроса", - max_length=20, - verbose_name="Короткое описание", - ), - ), - ] diff --git a/src/bot/migrations/0004_alter_coordinator_options_coordinator_is_chief.py b/src/bot/migrations/0004_alter_coordinator_options_coordinator_is_chief.py deleted file mode 100644 index 218ee049..00000000 --- a/src/bot/migrations/0004_alter_coordinator_options_coordinator_is_chief.py +++ /dev/null @@ -1,33 +0,0 @@ -# Generated by Django 4.2.4 on 2023-08-29 18:57 - -from django.db import migrations, models - -import bot.validators - - -class Migration(migrations.Migration): - """Migrations for bot.""" - - dependencies = [ - ("bot", "0003_alter_coordinator_first_name_and_more"), - ] - - operations = [ - migrations.AlterModelOptions( - name="coordinator", - options={ - "ordering": ("-is_chief", "last_name"), - "verbose_name": "Координатор", - "verbose_name_plural": "Координаторы", - }, - ), - migrations.AddField( - model_name="coordinator", - name="is_chief", - field=models.BooleanField( - default=False, - validators=[bot.validators.validate_is_chief], - verbose_name="Главный", - ), - ), - ] diff --git a/src/bot/migrations/0005_alter_coordinator_email_address_and_more.py b/src/bot/migrations/0005_alter_coordinator_email_address_and_more.py deleted file mode 100644 index 5fb326ef..00000000 --- a/src/bot/migrations/0005_alter_coordinator_email_address_and_more.py +++ /dev/null @@ -1,50 +0,0 @@ -# Generated by Django 4.2.4 on 2023-08-31 21:06 - -import django.db.models.deletion -from django.db import migrations, models - - -class Migration(migrations.Migration): - """Migrations for bot.""" - - dependencies = [ - ("core", "0002_alter_region_region_name"), - ("bot", "0004_alter_coordinator_options_coordinator_is_chief"), - ] - - operations = [ - migrations.AlterField( - model_name="coordinator", - name="email_address", - field=models.EmailField( - help_text="Введите адрес электронной почты", - max_length=254, - unique=True, - verbose_name="Email", - ), - ), - migrations.AlterField( - model_name="coordinator", - name="region", - field=models.OneToOneField( - help_text="Выберите регион из списка", - on_delete=django.db.models.deletion.PROTECT, - primary_key=True, - related_name="coordinators", - serialize=False, - to="core.region", - verbose_name="Регион", - ), - ), - migrations.AlterField( - model_name="fundprogram", - name="regions", - field=models.ManyToManyField( - blank=True, - help_text="Выберите регион(ы) для программы", - related_name="programs", - to="core.region", - verbose_name="Регионы", - ), - ), - ] diff --git a/src/bot/migrations/0006_alter_fundprogram_short_description_and_more.py b/src/bot/migrations/0006_alter_fundprogram_short_description_and_more.py deleted file mode 100644 index b1518f22..00000000 --- a/src/bot/migrations/0006_alter_fundprogram_short_description_and_more.py +++ /dev/null @@ -1,36 +0,0 @@ -# Generated by Django 4.2.4 on 2023-09-01 10:51 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ("bot", "0005_alter_coordinator_email_address_and_more"), - ] - - operations = [ - migrations.AlterField( - model_name="fundprogram", - name="short_description", - field=models.CharField( - help_text="Введите название кнопки в боте для данной программы", - max_length=20, - verbose_name="Текст на кнопке", - ), - ), - migrations.AlterField( - model_name="question", - name="question_type", - field=models.CharField( - choices=[ - ("LEGAL_ASSISTANCE", "Юридическая помощь"), - ("SOCIAL_ASSISTANCE", "Социальная помощь"), - ("PSYCHOLOGICAL_ASSISTANCE", "Психологическая помощь"), - ], - default="LEGAL_ASSISTANCE", - help_text="Выберите тип помощи для вопроса", - max_length=100, - verbose_name="Тип вопроса", - ), - ), - ] diff --git a/src/bot/migrations/0007_alter_question_short_description.py b/src/bot/migrations/0007_alter_question_short_description.py deleted file mode 100644 index 209e2534..00000000 --- a/src/bot/migrations/0007_alter_question_short_description.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 4.2.4 on 2023-09-01 15:43 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - """Migrations for bot.""" - - dependencies = [ - ("bot", "0006_alter_fundprogram_short_description_and_more"), - ] - - operations = [ - migrations.AlterField( - model_name="question", - name="short_description", - field=models.CharField( - help_text="Введите название кнопки в боте для данного вопроса", - max_length=20, - verbose_name="Текст на кнопке", - ), - ), - ] diff --git a/src/bot/migrations/0008_alter_coordinator_phone_number_and_more.py b/src/bot/migrations/0008_alter_coordinator_phone_number_and_more.py deleted file mode 100644 index 51eea2b1..00000000 --- a/src/bot/migrations/0008_alter_coordinator_phone_number_and_more.py +++ /dev/null @@ -1,49 +0,0 @@ -# Generated by Django 4.2.4 on 2023-09-03 17:19 - -import django.core.validators -from django.db import migrations, models - - -class Migration(migrations.Migration): - """Migrations for bot.""" - - dependencies = [ - ("bot", "0007_alter_question_short_description"), - ] - - operations = [ - migrations.AlterField( - model_name="coordinator", - name="phone_number", - field=models.CharField( - blank=True, - help_text="Введите номер телефона регионального координатора", - max_length=20, - null=True, - validators=[ - django.core.validators.RegexValidator( - message="Введите номер телефона в формате: +7 (777) 777-77-77", - regex="^[\\+]?[7, 8][-\\s\\.]?[(]?[0-9]{3}[)]?[-\\s\\.]?[0-9]{3}[-\\s\\.]?[0-9]{2}[-\\s\\.]?[0-9]{2}$", - ) - ], - verbose_name="Номер телефона", - ), - ), - migrations.AlterField( - model_name="coordinator", - name="telegram_account", - field=models.CharField( - blank=True, - help_text="Введите телеграмм-аккаунт регионального координатора", - max_length=32, - null=True, - validators=[ - django.core.validators.RegexValidator( - message="Введите название аккаунта telegram в формате: username", - regex="^[\\w\\_]{5,32}$", - ) - ], - verbose_name="Telegram", - ), - ), - ] diff --git a/src/bot_settings/migrations/0001_initial.py b/src/bot_settings/migrations/0001_initial.py index 6dd78c6a..434bb7b9 100644 --- a/src/bot_settings/migrations/0001_initial.py +++ b/src/bot_settings/migrations/0001_initial.py @@ -1,10 +1,11 @@ -# Generated by Django 4.2.3 on 2023-07-21 09:17 +# Generated by Django 4.2.4 on 2023-09-07 07:14 +import ckeditor.fields from django.db import migrations, models class Migration(migrations.Migration): - """Initial migration for bot_settings app.""" + """Migrations for bot.""" initial = True @@ -28,19 +29,27 @@ class Migration(migrations.Migration): ( "title", models.CharField( - max_length=255, verbose_name="Название настройки" + help_text="Введите название настройки для бота", + max_length=255, + verbose_name="Название настройки", ), ), ( "value", - models.CharField( - max_length=255, verbose_name="Значение настройки" + ckeditor.fields.RichTextField( + help_text="Введите значение настройки для бота", + max_length=255, + verbose_name="Значение настройки", ), ), ( "type", models.CharField( - choices=[("url", "URL"), ("text", "TEXT")], + choices=[ + ("url", "Ссылка"), + ("text", "Текст"), + ("int", "Число"), + ], max_length=100, verbose_name="Тип значения", ), diff --git a/src/bot_settings/migrations/0003_alter_botsettings_title_alter_botsettings_type_and_more.py b/src/bot_settings/migrations/0003_alter_botsettings_title_alter_botsettings_type_and_more.py deleted file mode 100644 index 7bdd26a8..00000000 --- a/src/bot_settings/migrations/0003_alter_botsettings_title_alter_botsettings_type_and_more.py +++ /dev/null @@ -1,46 +0,0 @@ -# Generated by Django 4.2.4 on 2023-09-01 16:07 - -import ckeditor.fields -from django.db import migrations, models - - -class Migration(migrations.Migration): - """Migrations for bot settings.""" - - dependencies = [ - ("bot_settings", "0002_add_settings"), - ] - - operations = [ - migrations.AlterField( - model_name="botsettings", - name="title", - field=models.CharField( - help_text="Введите название настройки для бота", - max_length=255, - verbose_name="Название настройки", - ), - ), - migrations.AlterField( - model_name="botsettings", - name="type", - field=models.CharField( - choices=[ - ("url", "Ссылка"), - ("text", "Текст"), - ("int", "Число"), - ], - max_length=100, - verbose_name="Тип значения", - ), - ), - migrations.AlterField( - model_name="botsettings", - name="value", - field=ckeditor.fields.RichTextField( - help_text="Введите значение настройки для бота", - max_length=255, - verbose_name="Значение настройки", - ), - ), - ] diff --git a/src/core/migrations/0001_initial.py b/src/core/migrations/0001_initial.py index 03d54bf0..91dca6c0 100644 --- a/src/core/migrations/0001_initial.py +++ b/src/core/migrations/0001_initial.py @@ -1,9 +1,11 @@ -# Generated by Django 4.2.3 on 2023-08-22 05:20 +# Generated by Django 4.2.4 on 2023-09-07 07:14 from django.db import migrations, models class Migration(migrations.Migration): + """Migrations for bot.""" + initial = True dependencies = [] @@ -23,7 +25,15 @@ class Migration(migrations.Migration): ), ("created_at", models.DateTimeField(auto_now_add=True)), ("updated_at", models.DateTimeField(auto_now=True)), - ("region_name", models.CharField(max_length=200, unique=True)), + ( + "region_name", + models.CharField( + help_text="Это название так же будет отображаться на кнопках бота", + max_length=200, + unique=True, + verbose_name="Название региона", + ), + ), ("region_key", models.CharField(max_length=200, unique=True)), ], options={ diff --git a/src/core/migrations/0002_alter_region_region_name.py b/src/core/migrations/0002_alter_region_region_name.py deleted file mode 100644 index c55b4257..00000000 --- a/src/core/migrations/0002_alter_region_region_name.py +++ /dev/null @@ -1,24 +0,0 @@ -# Generated by Django 4.2.4 on 2023-08-31 21:06 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - """Migrations for bot.""" - - dependencies = [ - ("core", "0001_initial"), - ] - - operations = [ - migrations.AlterField( - model_name="region", - name="region_name", - field=models.CharField( - help_text="Это название также будет отображаться на кнопках бота", - max_length=200, - unique=True, - verbose_name="Название региона", - ), - ), - ] diff --git a/src/core/migrations/0003_alter_region_region_name.py b/src/core/migrations/0003_alter_region_region_name.py deleted file mode 100644 index a53bba19..00000000 --- a/src/core/migrations/0003_alter_region_region_name.py +++ /dev/null @@ -1,24 +0,0 @@ -# Generated by Django 4.2.4 on 2023-09-01 16:07 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - """Migrations for bot.""" - - dependencies = [ - ("core", "0002_alter_region_region_name"), - ] - - operations = [ - migrations.AlterField( - model_name="region", - name="region_name", - field=models.CharField( - help_text="Это название так же будет отображаться на кнопках бота", - max_length=200, - unique=True, - verbose_name="Название региона", - ), - ), - ] diff --git a/src/users/migrations/0001_initial.py b/src/users/migrations/0001_initial.py index 0acc0c54..fba95ca6 100644 --- a/src/users/migrations/0001_initial.py +++ b/src/users/migrations/0001_initial.py @@ -1,6 +1,5 @@ -# Generated by Django 4.2.4 on 2023-08-29 18:35 +# Generated by Django 4.2.4 on 2023-09-07 07:17 -import django.db.models.deletion import django.utils.timezone from django.db import migrations, models @@ -8,13 +7,12 @@ class Migration(migrations.Migration): - """Migration.""" + """Migrations for bot.""" initial = True dependencies = [ ("auth", "0012_alter_user_first_name_max_length"), - ("core", "0001_initial"), ] operations = [ @@ -91,17 +89,6 @@ class Migration(migrations.Migration): verbose_name="Адрес электронной почты", ), ), - ( - "role", - models.CharField( - choices=[ - ("main_admin", "Администратор"), - ("region_admin", "Региональный администратор"), - ], - max_length=12, - verbose_name="Роль пользователя", - ), - ), ( "groups", models.ManyToManyField( @@ -113,15 +100,6 @@ class Migration(migrations.Migration): verbose_name="groups", ), ), - ( - "region", - models.ForeignKey( - null=True, - on_delete=django.db.models.deletion.SET_NULL, - to="core.region", - verbose_name="Регион пользователя", - ), - ), ( "user_permissions", models.ManyToManyField( diff --git a/src/users/migrations/0002_remove_user_region_remove_user_role.py b/src/users/migrations/0002_remove_user_region_remove_user_role.py deleted file mode 100644 index 80ec2c10..00000000 --- a/src/users/migrations/0002_remove_user_region_remove_user_role.py +++ /dev/null @@ -1,22 +0,0 @@ -# Generated by Django 4.2.4 on 2023-08-31 02:41 - -from django.db import migrations - - -class Migration(migrations.Migration): - """Migrations for users.""" - - dependencies = [ - ("users", "0001_initial"), - ] - - operations = [ - migrations.RemoveField( - model_name="user", - name="region", - ), - migrations.RemoveField( - model_name="user", - name="role", - ), - ]