diff --git a/myproject/orders/migrations/0004_orderstatus_not_both_positive_and_negative_end.py b/myproject/orders/migrations/0004_orderstatus_not_both_positive_and_negative_end.py new file mode 100644 index 0000000..29d75ef --- /dev/null +++ b/myproject/orders/migrations/0004_orderstatus_not_both_positive_and_negative_end.py @@ -0,0 +1,19 @@ +# Generated by Django 5.0.10 on 2026-01-05 14:00 + +from django.conf import settings +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('orders', '0003_allow_null_delivery_date_for_drafts'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.AddConstraint( + model_name='orderstatus', + constraint=models.CheckConstraint(check=models.Q(('is_positive_end', True), ('is_negative_end', True), _negated=True), name='not_both_positive_and_negative_end', violation_error_message='Статус не может быть одновременно положительным и отрицательным концом'), + ), + ]