diff --git a/shimatta_kenkyusho/parts/migrations/0007_stock_lot.py b/shimatta_kenkyusho/parts/migrations/0007_stock_lot.py new file mode 100644 index 0000000..67d64fa --- /dev/null +++ b/shimatta_kenkyusho/parts/migrations/0007_stock_lot.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.5 on 2021-12-30 22:32 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('parts', '0006_auto_20211114_1524'), + ] + + operations = [ + migrations.AddField( + model_name='stock', + name='lot', + field=models.CharField(blank=True, max_length=255, null=True), + ), + ] diff --git a/shimatta_kenkyusho/parts/models.py b/shimatta_kenkyusho/parts/models.py index 12ecce6..8c14ffe 100644 --- a/shimatta_kenkyusho/parts/models.py +++ b/shimatta_kenkyusho/parts/models.py @@ -227,6 +227,7 @@ class Stock(models.Model): storage = models.ForeignKey(Storage, on_delete=models.PROTECT, blank=True, null=True) amount = models.PositiveIntegerField() watermark = models.IntegerField() # negative is no watermark + lot = models.CharField(max_length=255, null=True, blank=True) def atomic_increment(self, increment): if self.amount + increment < 0: