mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add migration file for new database model
This commit is contained in:
parent
e20ddc289e
commit
a00dc9b0b1
22
InvenTree/part/migrations/0072_bomitemsubstitute.py
Normal file
22
InvenTree/part/migrations/0072_bomitemsubstitute.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Generated by Django 3.2.5 on 2021-10-12 23:24
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('part', '0071_alter_partparametertemplate_name'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='BomItemSubstitute',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('bom_item', models.ForeignKey(help_text='Parent BOM item', on_delete=django.db.models.deletion.CASCADE, related_name='substitutes', to='part.bomitem', verbose_name='BOM Item')),
|
||||||
|
('part', models.ForeignKey(help_text='Substitute part', limit_choices_to={'component': True}, on_delete=django.db.models.deletion.CASCADE, related_name='substitute_items', to='part.part', verbose_name='Part')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
Loading…
Reference in New Issue
Block a user