Update human_readable_id field in Order model

Alter the `human_readable_id` field to use a custom generator function and ensure uniqueness. This improves the readability and integrity of order identifiers.
This commit is contained in:
Egor Pavlovich Gorbunov 2025-05-06 17:04:29 +03:00
parent 4deece673f
commit dc9effdd5b

View file

@ -0,0 +1,19 @@
# 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'),
),
]