Объединены изменения из промежуточных миграций в начальные миграции для упрощения истории базы данных. Удалены миграции: accounts/0002, discounts/0002, orders/0003-0004, products/0002-0005, user_roles/0002, system_settings/0001-0002, integrations/0001-0002. Добавлена автоматическая creation пользователя при установке пароля. Обновлен UI страницы установки пароля с кастомным стилем. Добавлен conditional rendering для кнопки синхронизации Recommerce. Исправлены редиректы с 'index' на '/' в accounts views. Добавлена проверка request.tenant в navbar и authenticate метод в auth backend.
55 lines
2.1 KiB
Python
55 lines
2.1 KiB
Python
# Generated by Django 5.0.10 on 2026-01-14 07:04
|
|
|
|
import django.db.models.deletion
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
('customers', '0001_initial'),
|
|
('orders', '0001_initial'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AddField(
|
|
model_name='wallettransaction',
|
|
name='order',
|
|
field=models.ForeignKey(blank=True, help_text='Заказ, к которому относится транзакция (если применимо)', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='wallet_transactions', to='orders.order', verbose_name='Заказ'),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name='contactchannel',
|
|
index=models.Index(fields=['channel_type', 'value'], name='customers_c_channel_179e89_idx'),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name='contactchannel',
|
|
index=models.Index(fields=['customer'], name='customers_c_custome_f14e0e_idx'),
|
|
),
|
|
migrations.AlterUniqueTogether(
|
|
name='contactchannel',
|
|
unique_together={('channel_type', 'value')},
|
|
),
|
|
migrations.AddIndex(
|
|
model_name='wallettransaction',
|
|
index=models.Index(fields=['customer', '-created_at'], name='customers_w_custome_572f05_idx'),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name='wallettransaction',
|
|
index=models.Index(fields=['transaction_type'], name='customers_w_transac_5fda02_idx'),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name='wallettransaction',
|
|
index=models.Index(fields=['order'], name='customers_w_order_i_5e2527_idx'),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name='wallettransaction',
|
|
index=models.Index(fields=['balance_category'], name='customers_w_balance_81f0a9_idx'),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name='wallettransaction',
|
|
index=models.Index(fields=['customer', 'balance_category'], name='customers_w_custome_060570_idx'),
|
|
),
|
|
]
|