From 226828791f08102d257fe30decafc9cd8cfee9ce Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 14 Apr 2018 18:36:06 +1000 Subject: [PATCH] Added migration files to git index --- .gitignore | 1 - InvenTree/part/migrations/0001_initial.py | 116 ++++++++++++++++++ .../migrations/0002_auto_20180412_0600.py | 48 ++++++++ .../migrations/0003_auto_20180412_0644.py | 19 +++ .../migrations/0004_auto_20180413_0834.py | 21 ++++ .../migrations/0005_auto_20180413_1230.py | 20 +++ .../migrations/0006_auto_20180414_0403.py | 21 ++++ .../migrations/0007_auto_20180414_0416.py | 33 +++++ InvenTree/part/migrations/0008_part_url.py | 20 +++ InvenTree/part/migrations/0009_part_image.py | 20 +++ .../migrations/0010_auto_20180414_0725.py | 21 ++++ .../part/migrations/0011_partattachment.py | 25 ++++ InvenTree/part/migrations/__init__.py | 0 InvenTree/project/migrations/0001_initial.py | 72 +++++++++++ InvenTree/project/migrations/__init__.py | 0 InvenTree/stock/migrations/0001_initial.py | 115 +++++++++++++++++ .../migrations/0002_auto_20180412_0622.py | 34 +++++ .../migrations/0003_auto_20180413_1230.py | 20 +++ InvenTree/stock/migrations/__init__.py | 0 InvenTree/supplier/migrations/0001_initial.py | 103 ++++++++++++++++ .../migrations/0002_auto_20180412_0622.py | 21 ++++ .../migrations/0003_auto_20180414_0540.py | 30 +++++ .../migrations/0004_auto_20180414_0624.py | 21 ++++ InvenTree/supplier/migrations/__init__.py | 0 InvenTree/track/migrations/0001_initial.py | 47 +++++++ .../migrations/0002_auto_20180413_1440.py | 26 ++++ InvenTree/track/migrations/__init__.py | 0 27 files changed, 853 insertions(+), 1 deletion(-) create mode 100644 InvenTree/part/migrations/0001_initial.py create mode 100644 InvenTree/part/migrations/0002_auto_20180412_0600.py create mode 100644 InvenTree/part/migrations/0003_auto_20180412_0644.py create mode 100644 InvenTree/part/migrations/0004_auto_20180413_0834.py create mode 100644 InvenTree/part/migrations/0005_auto_20180413_1230.py create mode 100644 InvenTree/part/migrations/0006_auto_20180414_0403.py create mode 100644 InvenTree/part/migrations/0007_auto_20180414_0416.py create mode 100644 InvenTree/part/migrations/0008_part_url.py create mode 100644 InvenTree/part/migrations/0009_part_image.py create mode 100644 InvenTree/part/migrations/0010_auto_20180414_0725.py create mode 100644 InvenTree/part/migrations/0011_partattachment.py create mode 100644 InvenTree/part/migrations/__init__.py create mode 100644 InvenTree/project/migrations/0001_initial.py create mode 100644 InvenTree/project/migrations/__init__.py create mode 100644 InvenTree/stock/migrations/0001_initial.py create mode 100644 InvenTree/stock/migrations/0002_auto_20180412_0622.py create mode 100644 InvenTree/stock/migrations/0003_auto_20180413_1230.py create mode 100644 InvenTree/stock/migrations/__init__.py create mode 100644 InvenTree/supplier/migrations/0001_initial.py create mode 100644 InvenTree/supplier/migrations/0002_auto_20180412_0622.py create mode 100644 InvenTree/supplier/migrations/0003_auto_20180414_0540.py create mode 100644 InvenTree/supplier/migrations/0004_auto_20180414_0624.py create mode 100644 InvenTree/supplier/migrations/__init__.py create mode 100644 InvenTree/track/migrations/0001_initial.py create mode 100644 InvenTree/track/migrations/0002_auto_20180413_1440.py create mode 100644 InvenTree/track/migrations/__init__.py diff --git a/.gitignore b/.gitignore index 78b657e227..0cdc0ea367 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,6 @@ var/ *.log local_settings.py *.sqlite3 -**/migrations/* # Local media storage (only when running in development mode) InvenTree/media \ No newline at end of file diff --git a/InvenTree/part/migrations/0001_initial.py b/InvenTree/part/migrations/0001_initial.py new file mode 100644 index 0000000000..3596095a77 --- /dev/null +++ b/InvenTree/part/migrations/0001_initial.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2018-04-12 05:02 +from __future__ import unicode_literals + +import django.core.validators +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='CategoryParameterLink', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ], + options={ + 'verbose_name': 'Category Parameter', + 'verbose_name_plural': 'Category Parameters', + }, + ), + migrations.CreateModel( + name='Part', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=100)), + ('description', models.CharField(blank=True, max_length=250)), + ('IPN', models.CharField(blank=True, max_length=100)), + ('minimum_stock', models.PositiveIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0)])), + ('units', models.CharField(blank=True, default='pcs', max_length=20)), + ('trackable', models.BooleanField(default=False)), + ], + options={ + 'verbose_name': 'Part', + 'verbose_name_plural': 'Parts', + }, + ), + migrations.CreateModel( + name='PartCategory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=100)), + ('description', models.CharField(blank=True, max_length=250)), + ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='part.PartCategory')), + ], + options={ + 'verbose_name': 'Part Category', + 'verbose_name_plural': 'Part Categories', + }, + ), + migrations.CreateModel( + name='PartParameter', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('value', models.CharField(blank=True, max_length=50)), + ('min_value', models.CharField(blank=True, max_length=50)), + ('max_value', models.CharField(blank=True, max_length=50)), + ('part', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='parameters', to='part.Part')), + ], + options={ + 'verbose_name': 'Part Parameter', + 'verbose_name_plural': 'Part Parameters', + }, + ), + migrations.CreateModel( + name='PartParameterTemplate', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=20, unique=True)), + ('units', models.CharField(blank=True, max_length=10)), + ('format', models.PositiveIntegerField(choices=[(10, 'Numeric'), (20, 'Text'), (30, 'Bool')], default=10, validators=[django.core.validators.MinValueValidator(0)])), + ], + options={ + 'verbose_name': 'Parameter Template', + 'verbose_name_plural': 'Parameter Templates', + }, + ), + migrations.AddField( + model_name='partparameter', + name='template', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='part.PartParameterTemplate'), + ), + migrations.AddField( + model_name='part', + name='category', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='part.PartCategory'), + ), + migrations.AddField( + model_name='categoryparameterlink', + name='category', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='part.PartCategory'), + ), + migrations.AddField( + model_name='categoryparameterlink', + name='template', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='part.PartParameterTemplate'), + ), + migrations.AlterUniqueTogether( + name='partparameter', + unique_together=set([('part', 'template')]), + ), + migrations.AlterUniqueTogether( + name='part', + unique_together=set([('name', 'category'), ('IPN', 'category')]), + ), + migrations.AlterUniqueTogether( + name='categoryparameterlink', + unique_together=set([('category', 'template')]), + ), + ] diff --git a/InvenTree/part/migrations/0002_auto_20180412_0600.py b/InvenTree/part/migrations/0002_auto_20180412_0600.py new file mode 100644 index 0000000000..7e577c33f1 --- /dev/null +++ b/InvenTree/part/migrations/0002_auto_20180412_0600.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2018-04-12 06:00 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('part', '0001_initial'), + ] + + operations = [ + migrations.AlterUniqueTogether( + name='categoryparameterlink', + unique_together=set([]), + ), + migrations.RemoveField( + model_name='categoryparameterlink', + name='category', + ), + migrations.RemoveField( + model_name='categoryparameterlink', + name='template', + ), + migrations.AlterUniqueTogether( + name='partparameter', + unique_together=set([]), + ), + migrations.RemoveField( + model_name='partparameter', + name='part', + ), + migrations.RemoveField( + model_name='partparameter', + name='template', + ), + migrations.DeleteModel( + name='CategoryParameterLink', + ), + migrations.DeleteModel( + name='PartParameter', + ), + migrations.DeleteModel( + name='PartParameterTemplate', + ), + ] diff --git a/InvenTree/part/migrations/0003_auto_20180412_0644.py b/InvenTree/part/migrations/0003_auto_20180412_0644.py new file mode 100644 index 0000000000..4e94431685 --- /dev/null +++ b/InvenTree/part/migrations/0003_auto_20180412_0644.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2018-04-12 06:44 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('part', '0002_auto_20180412_0600'), + ] + + operations = [ + migrations.AlterUniqueTogether( + name='part', + unique_together=set([('name', 'category')]), + ), + ] diff --git a/InvenTree/part/migrations/0004_auto_20180413_0834.py b/InvenTree/part/migrations/0004_auto_20180413_0834.py new file mode 100644 index 0000000000..b34d5cdbe1 --- /dev/null +++ b/InvenTree/part/migrations/0004_auto_20180413_0834.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2018-04-13 08:34 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('part', '0003_auto_20180412_0644'), + ] + + operations = [ + migrations.AlterField( + model_name='part', + name='category', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='parts', to='part.PartCategory'), + ), + ] diff --git a/InvenTree/part/migrations/0005_auto_20180413_1230.py b/InvenTree/part/migrations/0005_auto_20180413_1230.py new file mode 100644 index 0000000000..76b3e82868 --- /dev/null +++ b/InvenTree/part/migrations/0005_auto_20180413_1230.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2018-04-13 12:30 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('part', '0004_auto_20180413_0834'), + ] + + operations = [ + migrations.AlterField( + model_name='partcategory', + name='name', + field=models.CharField(max_length=100, unique=True), + ), + ] diff --git a/InvenTree/part/migrations/0006_auto_20180414_0403.py b/InvenTree/part/migrations/0006_auto_20180414_0403.py new file mode 100644 index 0000000000..0d7f5c7060 --- /dev/null +++ b/InvenTree/part/migrations/0006_auto_20180414_0403.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2018-04-14 04:03 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('part', '0005_auto_20180413_1230'), + ] + + operations = [ + migrations.AlterField( + model_name='part', + name='category', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='parts', to='part.PartCategory'), + ), + ] diff --git a/InvenTree/part/migrations/0007_auto_20180414_0416.py b/InvenTree/part/migrations/0007_auto_20180414_0416.py new file mode 100644 index 0000000000..1ae2e5685e --- /dev/null +++ b/InvenTree/part/migrations/0007_auto_20180414_0416.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2018-04-14 04:16 +from __future__ import unicode_literals + +import django.core.validators +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('part', '0006_auto_20180414_0403'), + ] + + operations = [ + migrations.CreateModel( + name='BomItem', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('quantity', models.PositiveIntegerField(default=1, validators=[django.core.validators.MinValueValidator(0)])), + ('part', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='bom_items', to='part.Part')), + ('sub_part', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='used_in', to='part.Part')), + ], + options={ + 'verbose_name': 'BOM Item', + }, + ), + migrations.AlterUniqueTogether( + name='bomitem', + unique_together=set([('part', 'sub_part')]), + ), + ] diff --git a/InvenTree/part/migrations/0008_part_url.py b/InvenTree/part/migrations/0008_part_url.py new file mode 100644 index 0000000000..1cc9dee52e --- /dev/null +++ b/InvenTree/part/migrations/0008_part_url.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2018-04-14 06:31 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('part', '0007_auto_20180414_0416'), + ] + + operations = [ + migrations.AddField( + model_name='part', + name='URL', + field=models.URLField(blank=True), + ), + ] diff --git a/InvenTree/part/migrations/0009_part_image.py b/InvenTree/part/migrations/0009_part_image.py new file mode 100644 index 0000000000..9dc9c28c70 --- /dev/null +++ b/InvenTree/part/migrations/0009_part_image.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2018-04-14 06:53 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('part', '0008_part_url'), + ] + + operations = [ + migrations.AddField( + model_name='part', + name='image', + field=models.ImageField(blank=True, upload_to='part_images'), + ), + ] diff --git a/InvenTree/part/migrations/0010_auto_20180414_0725.py b/InvenTree/part/migrations/0010_auto_20180414_0725.py new file mode 100644 index 0000000000..24266bff6c --- /dev/null +++ b/InvenTree/part/migrations/0010_auto_20180414_0725.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2018-04-14 07:25 +from __future__ import unicode_literals + +from django.db import migrations, models +import part.models + + +class Migration(migrations.Migration): + + dependencies = [ + ('part', '0009_part_image'), + ] + + operations = [ + migrations.AlterField( + model_name='part', + name='image', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=part.models.rename_part_image), + ), + ] diff --git a/InvenTree/part/migrations/0011_partattachment.py b/InvenTree/part/migrations/0011_partattachment.py new file mode 100644 index 0000000000..9d3ce4b166 --- /dev/null +++ b/InvenTree/part/migrations/0011_partattachment.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2018-04-14 08:21 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion +import part.models + + +class Migration(migrations.Migration): + + dependencies = [ + ('part', '0010_auto_20180414_0725'), + ] + + operations = [ + migrations.CreateModel( + name='PartAttachment', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('attachment', models.FileField(blank=True, null=True, upload_to=part.models.attach_file)), + ('part', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='attachments', to='part.Part')), + ], + ), + ] diff --git a/InvenTree/part/migrations/__init__.py b/InvenTree/part/migrations/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/InvenTree/project/migrations/0001_initial.py b/InvenTree/project/migrations/0001_initial.py new file mode 100644 index 0000000000..81158f76e6 --- /dev/null +++ b/InvenTree/project/migrations/0001_initial.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2018-04-12 05:02 +from __future__ import unicode_literals + +import django.core.validators +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('part', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='Project', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=100)), + ('description', models.CharField(blank=True, max_length=500)), + ], + ), + migrations.CreateModel( + name='ProjectCategory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=100)), + ('description', models.CharField(blank=True, max_length=250)), + ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='project.ProjectCategory')), + ], + options={ + 'verbose_name': 'Project Category', + 'verbose_name_plural': 'Project Categories', + }, + ), + migrations.CreateModel( + name='ProjectPart', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('quantity', models.PositiveIntegerField(default=1, validators=[django.core.validators.MinValueValidator(0)])), + ('output', models.BooleanField(default=False)), + ('part', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='part.Part')), + ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='project.Project')), + ], + ), + migrations.CreateModel( + name='ProjectRun', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('quantity', models.PositiveIntegerField(default=1, validators=[django.core.validators.MinValueValidator(0)])), + ('run_date', models.DateField(blank=True, null=True)), + ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='project.Project')), + ], + ), + migrations.AddField( + model_name='project', + name='category', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='projects', to='project.ProjectCategory'), + ), + migrations.AlterUniqueTogether( + name='projectpart', + unique_together=set([('part', 'project')]), + ), + migrations.AlterUniqueTogether( + name='project', + unique_together=set([('name', 'category')]), + ), + ] diff --git a/InvenTree/project/migrations/__init__.py b/InvenTree/project/migrations/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/InvenTree/stock/migrations/0001_initial.py b/InvenTree/stock/migrations/0001_initial.py new file mode 100644 index 0000000000..a1c421bb2a --- /dev/null +++ b/InvenTree/stock/migrations/0001_initial.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2018-04-12 05:02 +from __future__ import unicode_literals + +from django.conf import settings +import django.core.validators +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('part', '0001_initial'), + ('supplier', '__first__'), + ] + + operations = [ + migrations.CreateModel( + name='HistoricalStockItem', + fields=[ + ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')), + ('quantity', models.PositiveIntegerField(validators=[django.core.validators.MinValueValidator(0)])), + ('updated', models.DateField(blank=True, editable=False)), + ('stocktake_date', models.DateField(blank=True, null=True)), + ('review_needed', models.BooleanField(default=False)), + ('status', models.PositiveIntegerField(choices=[(10, 'In stock'), (15, 'Incoming'), (50, 'Attention needed'), (20, 'In progress'), (55, 'Damaged'), (25, 'Complete'), (60, 'Destroyed')], default=10, validators=[django.core.validators.MinValueValidator(0)])), + ('notes', models.CharField(blank=True, max_length=100)), + ('expected_arrival', models.DateField(blank=True, null=True)), + ('infinite', models.BooleanField(default=False)), + ('history_id', models.AutoField(primary_key=True, serialize=False)), + ('history_date', models.DateTimeField()), + ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)), + ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), + ], + options={ + 'ordering': ('-history_date', '-history_id'), + 'get_latest_by': 'history_date', + 'verbose_name': 'historical stock item', + }, + ), + migrations.CreateModel( + name='StockItem', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('quantity', models.PositiveIntegerField(validators=[django.core.validators.MinValueValidator(0)])), + ('updated', models.DateField(auto_now=True)), + ('stocktake_date', models.DateField(blank=True, null=True)), + ('review_needed', models.BooleanField(default=False)), + ('status', models.PositiveIntegerField(choices=[(10, 'In stock'), (15, 'Incoming'), (50, 'Attention needed'), (20, 'In progress'), (55, 'Damaged'), (25, 'Complete'), (60, 'Destroyed')], default=10, validators=[django.core.validators.MinValueValidator(0)])), + ('notes', models.CharField(blank=True, max_length=100)), + ('expected_arrival', models.DateField(blank=True, null=True)), + ('infinite', models.BooleanField(default=False)), + ], + ), + migrations.CreateModel( + name='StockLocation', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=100)), + ('description', models.CharField(blank=True, max_length=250)), + ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='stock.StockLocation')), + ], + options={ + 'abstract': False, + }, + ), + migrations.AddField( + model_name='stockitem', + name='location', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='stock.StockLocation'), + ), + migrations.AddField( + model_name='stockitem', + name='part', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='locations', to='part.Part'), + ), + migrations.AddField( + model_name='stockitem', + name='stocktake_user', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='stockitem', + name='supplier_part', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='supplier.SupplierPart'), + ), + migrations.AddField( + model_name='historicalstockitem', + name='location', + field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='stock.StockLocation'), + ), + migrations.AddField( + model_name='historicalstockitem', + name='part', + field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='part.Part'), + ), + migrations.AddField( + model_name='historicalstockitem', + name='stocktake_user', + field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='historicalstockitem', + name='supplier_part', + field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='supplier.SupplierPart'), + ), + migrations.AlterUniqueTogether( + name='stocklocation', + unique_together=set([('name', 'parent')]), + ), + ] diff --git a/InvenTree/stock/migrations/0002_auto_20180412_0622.py b/InvenTree/stock/migrations/0002_auto_20180412_0622.py new file mode 100644 index 0000000000..f724dd7d07 --- /dev/null +++ b/InvenTree/stock/migrations/0002_auto_20180412_0622.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2018-04-12 06:22 +from __future__ import unicode_literals + +import django.core.validators +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('stock', '0001_initial'), + ] + + operations = [ + migrations.RemoveField( + model_name='historicalstockitem', + name='expected_arrival', + ), + migrations.RemoveField( + model_name='stockitem', + name='expected_arrival', + ), + migrations.AlterField( + model_name='historicalstockitem', + name='status', + field=models.PositiveIntegerField(choices=[(10, 'OK'), (60, 'Destroyed'), (50, 'Attention needed'), (55, 'Damaged')], default=10, validators=[django.core.validators.MinValueValidator(0)]), + ), + migrations.AlterField( + model_name='stockitem', + name='status', + field=models.PositiveIntegerField(choices=[(10, 'OK'), (60, 'Destroyed'), (50, 'Attention needed'), (55, 'Damaged')], default=10, validators=[django.core.validators.MinValueValidator(0)]), + ), + ] diff --git a/InvenTree/stock/migrations/0003_auto_20180413_1230.py b/InvenTree/stock/migrations/0003_auto_20180413_1230.py new file mode 100644 index 0000000000..062c9490e7 --- /dev/null +++ b/InvenTree/stock/migrations/0003_auto_20180413_1230.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2018-04-13 12:30 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('stock', '0002_auto_20180412_0622'), + ] + + operations = [ + migrations.AlterField( + model_name='stocklocation', + name='name', + field=models.CharField(max_length=100, unique=True), + ), + ] diff --git a/InvenTree/stock/migrations/__init__.py b/InvenTree/stock/migrations/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/InvenTree/supplier/migrations/0001_initial.py b/InvenTree/supplier/migrations/0001_initial.py new file mode 100644 index 0000000000..eb2d181f2c --- /dev/null +++ b/InvenTree/supplier/migrations/0001_initial.py @@ -0,0 +1,103 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2018-04-12 05:02 +from __future__ import unicode_literals + +import django.core.validators +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('part', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='Customer', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=100, unique=True)), + ('website', models.URLField(blank=True)), + ('address', models.CharField(blank=True, max_length=200)), + ('phone', models.CharField(blank=True, max_length=50)), + ('email', models.EmailField(blank=True, max_length=254)), + ('contact', models.CharField(blank=True, max_length=100)), + ('notes', models.CharField(blank=True, max_length=500)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='Manufacturer', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=100, unique=True)), + ('website', models.URLField(blank=True)), + ('address', models.CharField(blank=True, max_length=200)), + ('phone', models.CharField(blank=True, max_length=50)), + ('email', models.EmailField(blank=True, max_length=254)), + ('contact', models.CharField(blank=True, max_length=100)), + ('notes', models.CharField(blank=True, max_length=500)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='Supplier', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=100, unique=True)), + ('website', models.URLField(blank=True)), + ('address', models.CharField(blank=True, max_length=200)), + ('phone', models.CharField(blank=True, max_length=50)), + ('email', models.EmailField(blank=True, max_length=254)), + ('contact', models.CharField(blank=True, max_length=100)), + ('notes', models.CharField(blank=True, max_length=500)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='SupplierPart', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('SKU', models.CharField(max_length=100)), + ('MPN', models.CharField(blank=True, max_length=100)), + ('URL', models.URLField(blank=True)), + ('description', models.CharField(blank=True, max_length=250)), + ('single_price', models.DecimalField(decimal_places=3, default=0, max_digits=10)), + ('base_cost', models.DecimalField(decimal_places=3, default=0, max_digits=10)), + ('packaging', models.CharField(blank=True, max_length=50)), + ('multiple', models.PositiveIntegerField(default=1, validators=[django.core.validators.MinValueValidator(0)])), + ('minimum', models.PositiveIntegerField(default=1, validators=[django.core.validators.MinValueValidator(0)])), + ('lead_time', models.DurationField(blank=True, null=True)), + ('manufacturer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='supplier.Manufacturer')), + ('part', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='part.Part')), + ('supplier', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='supplier.Supplier')), + ], + ), + migrations.CreateModel( + name='SupplierPriceBreak', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('quantity', models.PositiveIntegerField(validators=[django.core.validators.MinValueValidator(0)])), + ('cost', models.DecimalField(decimal_places=3, max_digits=10)), + ('part', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='price_breaks', to='supplier.SupplierPart')), + ], + ), + migrations.AlterUniqueTogether( + name='supplierpricebreak', + unique_together=set([('part', 'quantity')]), + ), + migrations.AlterUniqueTogether( + name='supplierpart', + unique_together=set([('part', 'supplier', 'SKU')]), + ), + ] diff --git a/InvenTree/supplier/migrations/0002_auto_20180412_0622.py b/InvenTree/supplier/migrations/0002_auto_20180412_0622.py new file mode 100644 index 0000000000..cbd415caa2 --- /dev/null +++ b/InvenTree/supplier/migrations/0002_auto_20180412_0622.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2018-04-12 06:22 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('supplier', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='supplierpart', + name='part', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='supplier_parts', to='part.Part'), + ), + ] diff --git a/InvenTree/supplier/migrations/0003_auto_20180414_0540.py b/InvenTree/supplier/migrations/0003_auto_20180414_0540.py new file mode 100644 index 0000000000..3c8c391cee --- /dev/null +++ b/InvenTree/supplier/migrations/0003_auto_20180414_0540.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2018-04-14 05:40 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('supplier', '0002_auto_20180412_0622'), + ] + + operations = [ + migrations.AddField( + model_name='customer', + name='description', + field=models.CharField(blank=True, max_length=500), + ), + migrations.AddField( + model_name='manufacturer', + name='description', + field=models.CharField(blank=True, max_length=500), + ), + migrations.AddField( + model_name='supplier', + name='description', + field=models.CharField(blank=True, max_length=500), + ), + ] diff --git a/InvenTree/supplier/migrations/0004_auto_20180414_0624.py b/InvenTree/supplier/migrations/0004_auto_20180414_0624.py new file mode 100644 index 0000000000..c9701ecf61 --- /dev/null +++ b/InvenTree/supplier/migrations/0004_auto_20180414_0624.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2018-04-14 06:24 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('supplier', '0003_auto_20180414_0540'), + ] + + operations = [ + migrations.AlterField( + model_name='supplierpart', + name='supplier', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='parts', to='supplier.Supplier'), + ), + ] diff --git a/InvenTree/supplier/migrations/__init__.py b/InvenTree/supplier/migrations/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/InvenTree/track/migrations/0001_initial.py b/InvenTree/track/migrations/0001_initial.py new file mode 100644 index 0000000000..8f84a6b6a4 --- /dev/null +++ b/InvenTree/track/migrations/0001_initial.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2018-04-12 05:02 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('part', '0001_initial'), + ('supplier', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='PartTrackingInfo', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('date', models.DateField(auto_now_add=True)), + ('notes', models.CharField(max_length=500)), + ], + ), + migrations.CreateModel( + name='UniquePart', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('creation_date', models.DateField(auto_now_add=True)), + ('serial', models.IntegerField()), + ('status', models.IntegerField(choices=[(0, 'In progress'), (40, 'Damaged'), (10, 'In stock'), (50, 'Destroyed'), (20, 'Shipped'), (30, 'Returned')], default=0)), + ('customer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='supplier.Customer')), + ('part', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='part.Part')), + ], + ), + migrations.AddField( + model_name='parttrackinginfo', + name='part', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tracking_info', to='track.UniquePart'), + ), + migrations.AlterUniqueTogether( + name='uniquepart', + unique_together=set([('part', 'serial')]), + ), + ] diff --git a/InvenTree/track/migrations/0002_auto_20180413_1440.py b/InvenTree/track/migrations/0002_auto_20180413_1440.py new file mode 100644 index 0000000000..bc3a2ed5ea --- /dev/null +++ b/InvenTree/track/migrations/0002_auto_20180413_1440.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2018-04-13 14:40 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('track', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='uniquepart', + name='part', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='serials', to='part.Part'), + ), + migrations.AlterField( + model_name='uniquepart', + name='serial', + field=models.PositiveIntegerField(), + ), + ] diff --git a/InvenTree/track/migrations/__init__.py b/InvenTree/track/migrations/__init__.py new file mode 100644 index 0000000000..e69de29bb2