livestock type in quota limitations
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 5.0 on 2025-07-14 09:01
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('product', '0045_quotalivestockallocation_livestock_type'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='quotalivestockagelimitation',
|
||||
name='livestock_type',
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,20 @@
|
||||
# Generated by Django 5.0 on 2025-07-14 09:04
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('livestock', '0012_livestocktype_weight_type'),
|
||||
('product', '0046_remove_quotalivestockagelimitation_livestock_type'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='quotalivestockagelimitation',
|
||||
name='livestock_type',
|
||||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='quota_limitations', to='livestock.livestocktype'),
|
||||
),
|
||||
]
|
||||
@@ -458,7 +458,12 @@ class QuotaLiveStockAgeLimitation(BaseModel):
|
||||
related_name='livestock_age_limitations',
|
||||
null=True
|
||||
)
|
||||
livestock_type = models.CharField(max_length=20, choices=LivestockType.choices, null=True)
|
||||
livestock_type = models.ForeignKey(
|
||||
LiveStockType,
|
||||
on_delete=models.CASCADE,
|
||||
related_name='quota_limitations',
|
||||
null=True
|
||||
)
|
||||
livestock_subtype = models.CharField(max_length=20, choices=LivestockSubtype.choices, null=True)
|
||||
age_month = models.PositiveIntegerField(default=0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user