From ca60bf09a60a1afb0dabbe5993d053b5e24e8ae4 Mon Sep 17 00:00:00 2001 From: Egor fureunoir Gorbunov Date: Tue, 6 May 2025 17:06:39 +0300 Subject: [PATCH] Increase max_length of human_readable_id to 8. Updated the `human_readable_id` field in the `Order` model to support a maximum length of 8 instead of 6. Removed the redundant migration file `0019_alter_order_human_readable_id.py` for cleanup. --- .../0017_order_human_readable_id.py | 2 +- .../0018_alter_order_human_readable_id.py | 2 +- .../0019_alter_order_human_readable_id.py | 19 ------------------- 3 files changed, 2 insertions(+), 21 deletions(-) delete mode 100644 core/migrations/0019_alter_order_human_readable_id.py diff --git a/core/migrations/0017_order_human_readable_id.py b/core/migrations/0017_order_human_readable_id.py index e5fc9e8e..e48e4d45 100644 --- a/core/migrations/0017_order_human_readable_id.py +++ b/core/migrations/0017_order_human_readable_id.py @@ -14,6 +14,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='order', name='human_readable_id', - field=models.CharField(default=core.utils.generate_human_readable_id, help_text='a human-readable identifier for the order', max_length=6, verbose_name='human readable id'), + field=models.CharField(default=core.utils.generate_human_readable_id, help_text='a human-readable identifier for the order', max_length=8, verbose_name='human readable id'), ), ] diff --git a/core/migrations/0018_alter_order_human_readable_id.py b/core/migrations/0018_alter_order_human_readable_id.py index 7f41dd5d..2b5d8375 100644 --- a/core/migrations/0018_alter_order_human_readable_id.py +++ b/core/migrations/0018_alter_order_human_readable_id.py @@ -14,6 +14,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='order', name='human_readable_id', - field=models.CharField(default=core.utils.generate_human_readable_id, help_text='a human-readable identifier for the order', max_length=6, unique=True, verbose_name='human readable id'), + field=models.CharField(default=core.utils.generate_human_readable_id, help_text='a human-readable identifier for the order', max_length=8, unique=True, verbose_name='human readable id'), ), ] diff --git a/core/migrations/0019_alter_order_human_readable_id.py b/core/migrations/0019_alter_order_human_readable_id.py deleted file mode 100644 index e9f8c60d..00000000 --- a/core/migrations/0019_alter_order_human_readable_id.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 5.1.8 on 2025-05-06 14:01 - -import core.utils -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('core', '0018_alter_order_human_readable_id'), - ] - - operations = [ - migrations.AlterField( - model_name='order', - name='human_readable_id', - field=models.CharField(default=core.utils.generate_human_readable_id, help_text='a human-readable identifier for the order', max_length=8, unique=True, verbose_name='human readable id'), - ), - ]