mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
26 lines
1.1 KiB
Python
26 lines
1.1 KiB
Python
# Generated by Django 2.2 on 2019-04-29 12:14
|
|
|
|
import django.core.validators
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('stock', '0009_auto_20190428_0841'),
|
|
('build', '0002_auto_20190412_2030'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='BuildItemAllocation',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('quantity', models.PositiveIntegerField(default=1, help_text='Stock quantity to allocate to build', validators=[django.core.validators.MinValueValidator(1)])),
|
|
('build', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='allocated_stock', to='build.Build')),
|
|
('stock', models.ForeignKey(help_text='Stock Item to allocate to build', on_delete=django.db.models.deletion.CASCADE, related_name='allocations', to='stock.StockItem')),
|
|
],
|
|
),
|
|
]
|