InvenTree/InvenTree/stock/migrations/0021_auto_20200215_2232.py
Oliver Walters 750dfcda07 Add 'parent' field for StockItem
- Allows StockItem to be tracked when it is split into multiple items
- Uses MPTT field
2020-02-17 21:52:31 +11:00

45 lines
1.4 KiB
Python

# Generated by Django 2.2.9 on 2020-02-15 22:32
from django.db import migrations, models
import django.db.models.deletion
import mptt.fields
class Migration(migrations.Migration):
dependencies = [
('stock', '0020_auto_20200206_1213'),
]
operations = [
migrations.AddField(
model_name='stockitem',
name='level',
field=models.PositiveIntegerField(default=0, editable=False),
preserve_default=False,
),
migrations.AddField(
model_name='stockitem',
name='lft',
field=models.PositiveIntegerField(default=0, editable=False),
preserve_default=False,
),
migrations.AddField(
model_name='stockitem',
name='parent',
field=mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='children', to='stock.StockItem'),
),
migrations.AddField(
model_name='stockitem',
name='rght',
field=models.PositiveIntegerField(default=0, editable=False),
preserve_default=False,
),
migrations.AddField(
model_name='stockitem',
name='tree_id',
field=models.PositiveIntegerField(db_index=True, default=0, editable=False),
preserve_default=False,
),
]