# Generated by Django 5.2.4 on 2025-07-31 08:19

import django.contrib.postgres.indexes
import uuid
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('product', '0024_remove_productcategory_menu_image_one_and_more'),
        ('vat', '0006_rename_vat_created_at_idx_vat_created_at_ix_and_more'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.RemoveIndex(
            model_name='product',
            name='product_product_code_ix',
        ),
        migrations.RemoveField(
            model_name='historicalproduct',
            name='product_code',
        ),
        migrations.RemoveField(
            model_name='product',
            name='product_code',
        ),
        migrations.AddField(
            model_name='historicalproduct',
            name='sku',
            field=models.CharField(db_index=True, default=uuid.uuid4, max_length=100, verbose_name='SKU'),
        ),
        migrations.AddField(
            model_name='product',
            name='sku',
            field=models.CharField(default=uuid.uuid4, max_length=100, unique=True, verbose_name='SKU'),
        ),
        migrations.AddIndex(
            model_name='product',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['sku'], name='product_sku_ix'),
        ),
    ]
