Fix: Product name unique
This commit is contained in:
parent
19a1ba29d7
commit
8d29202d3a
@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 5.0.7 on 2024-08-03 16:32
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('don_confiao', '0026_alter_sale_customer'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='product',
|
||||||
|
name='name',
|
||||||
|
field=models.CharField(max_length=100, unique=True),
|
||||||
|
),
|
||||||
|
]
|
@ -22,7 +22,7 @@ class ProductCategory(models.Model):
|
|||||||
|
|
||||||
|
|
||||||
class Product(models.Model):
|
class Product(models.Model):
|
||||||
name = models.CharField(max_length=100, unique=False)
|
name = models.CharField(max_length=100, unique=True)
|
||||||
price = models.DecimalField(max_digits=9, decimal_places=2)
|
price = models.DecimalField(max_digits=9, decimal_places=2)
|
||||||
measuring_unit = models.CharField(
|
measuring_unit = models.CharField(
|
||||||
max_length=20,
|
max_length=20,
|
||||||
|
Loading…
Reference in New Issue
Block a user