18
core/apps/products/migrations/0007_alter_product_name.py
Normal file
18
core/apps/products/migrations/0007_alter_product_name.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.2.4 on 2025-10-06 18:14
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('products', '0006_alter_product_type'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='product',
|
||||
name='name',
|
||||
field=models.CharField(max_length=200, unique=True),
|
||||
),
|
||||
]
|
||||
@@ -12,7 +12,7 @@ class Product(BaseModel):
|
||||
("SERVICE", 'xizmat')
|
||||
)
|
||||
|
||||
name = models.CharField(max_length=200)
|
||||
name = models.CharField(max_length=200, unique=True)
|
||||
type = models.CharField(max_length=20, choices=TYPE, default="TANGIBLE")
|
||||
unity = models.ForeignKey(
|
||||
'products.Unity', on_delete=models.SET_NULL, related_name='products', null=True
|
||||
|
||||
Reference in New Issue
Block a user