import --> parent to distribution batches
This commit is contained in:
19
apps/tag/migrations/0040_tagdistributionbatch_parent.py
Normal file
19
apps/tag/migrations/0040_tagdistributionbatch_parent.py
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Generated by Django 5.0 on 2026-01-24 09:13
|
||||||
|
|
||||||
|
import django.db.models.deletion
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('tag', '0039_tagbatch_total_distributed_tags'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='tagdistributionbatch',
|
||||||
|
name='parent',
|
||||||
|
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='tag.tagdistributionbatch'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -122,6 +122,12 @@ class TagDistribution(BaseModel):
|
|||||||
|
|
||||||
|
|
||||||
class TagDistributionBatch(BaseModel):
|
class TagDistributionBatch(BaseModel):
|
||||||
|
parent = models.ForeignKey(
|
||||||
|
'self',
|
||||||
|
on_delete=models.CASCADE,
|
||||||
|
related_name='children',
|
||||||
|
null=True
|
||||||
|
)
|
||||||
dist_batch_identity = models.CharField(max_length=20, default="0", unique=True, null=True)
|
dist_batch_identity = models.CharField(max_length=20, default="0", unique=True, null=True)
|
||||||
assigner_org = models.ForeignKey(
|
assigner_org = models.ForeignKey(
|
||||||
Organization,
|
Organization,
|
||||||
|
|||||||
Reference in New Issue
Block a user