mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Added migration files to git index
This commit is contained in:
parent
a31ec388f4
commit
226828791f
1
.gitignore
vendored
1
.gitignore
vendored
@ -26,7 +26,6 @@ var/
|
|||||||
*.log
|
*.log
|
||||||
local_settings.py
|
local_settings.py
|
||||||
*.sqlite3
|
*.sqlite3
|
||||||
**/migrations/*
|
|
||||||
|
|
||||||
# Local media storage (only when running in development mode)
|
# Local media storage (only when running in development mode)
|
||||||
InvenTree/media
|
InvenTree/media
|
116
InvenTree/part/migrations/0001_initial.py
Normal file
116
InvenTree/part/migrations/0001_initial.py
Normal file
@ -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')]),
|
||||||
|
),
|
||||||
|
]
|
48
InvenTree/part/migrations/0002_auto_20180412_0600.py
Normal file
48
InvenTree/part/migrations/0002_auto_20180412_0600.py
Normal file
@ -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',
|
||||||
|
),
|
||||||
|
]
|
19
InvenTree/part/migrations/0003_auto_20180412_0644.py
Normal file
19
InvenTree/part/migrations/0003_auto_20180412_0644.py
Normal file
@ -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')]),
|
||||||
|
),
|
||||||
|
]
|
21
InvenTree/part/migrations/0004_auto_20180413_0834.py
Normal file
21
InvenTree/part/migrations/0004_auto_20180413_0834.py
Normal file
@ -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'),
|
||||||
|
),
|
||||||
|
]
|
20
InvenTree/part/migrations/0005_auto_20180413_1230.py
Normal file
20
InvenTree/part/migrations/0005_auto_20180413_1230.py
Normal file
@ -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),
|
||||||
|
),
|
||||||
|
]
|
21
InvenTree/part/migrations/0006_auto_20180414_0403.py
Normal file
21
InvenTree/part/migrations/0006_auto_20180414_0403.py
Normal file
@ -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'),
|
||||||
|
),
|
||||||
|
]
|
33
InvenTree/part/migrations/0007_auto_20180414_0416.py
Normal file
33
InvenTree/part/migrations/0007_auto_20180414_0416.py
Normal file
@ -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')]),
|
||||||
|
),
|
||||||
|
]
|
20
InvenTree/part/migrations/0008_part_url.py
Normal file
20
InvenTree/part/migrations/0008_part_url.py
Normal file
@ -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),
|
||||||
|
),
|
||||||
|
]
|
20
InvenTree/part/migrations/0009_part_image.py
Normal file
20
InvenTree/part/migrations/0009_part_image.py
Normal file
@ -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'),
|
||||||
|
),
|
||||||
|
]
|
21
InvenTree/part/migrations/0010_auto_20180414_0725.py
Normal file
21
InvenTree/part/migrations/0010_auto_20180414_0725.py
Normal file
@ -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),
|
||||||
|
),
|
||||||
|
]
|
25
InvenTree/part/migrations/0011_partattachment.py
Normal file
25
InvenTree/part/migrations/0011_partattachment.py
Normal file
@ -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')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
0
InvenTree/part/migrations/__init__.py
Normal file
0
InvenTree/part/migrations/__init__.py
Normal file
72
InvenTree/project/migrations/0001_initial.py
Normal file
72
InvenTree/project/migrations/0001_initial.py
Normal file
@ -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')]),
|
||||||
|
),
|
||||||
|
]
|
0
InvenTree/project/migrations/__init__.py
Normal file
0
InvenTree/project/migrations/__init__.py
Normal file
115
InvenTree/stock/migrations/0001_initial.py
Normal file
115
InvenTree/stock/migrations/0001_initial.py
Normal file
@ -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')]),
|
||||||
|
),
|
||||||
|
]
|
34
InvenTree/stock/migrations/0002_auto_20180412_0622.py
Normal file
34
InvenTree/stock/migrations/0002_auto_20180412_0622.py
Normal file
@ -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)]),
|
||||||
|
),
|
||||||
|
]
|
20
InvenTree/stock/migrations/0003_auto_20180413_1230.py
Normal file
20
InvenTree/stock/migrations/0003_auto_20180413_1230.py
Normal file
@ -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),
|
||||||
|
),
|
||||||
|
]
|
0
InvenTree/stock/migrations/__init__.py
Normal file
0
InvenTree/stock/migrations/__init__.py
Normal file
103
InvenTree/supplier/migrations/0001_initial.py
Normal file
103
InvenTree/supplier/migrations/0001_initial.py
Normal file
@ -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')]),
|
||||||
|
),
|
||||||
|
]
|
21
InvenTree/supplier/migrations/0002_auto_20180412_0622.py
Normal file
21
InvenTree/supplier/migrations/0002_auto_20180412_0622.py
Normal file
@ -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'),
|
||||||
|
),
|
||||||
|
]
|
30
InvenTree/supplier/migrations/0003_auto_20180414_0540.py
Normal file
30
InvenTree/supplier/migrations/0003_auto_20180414_0540.py
Normal file
@ -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),
|
||||||
|
),
|
||||||
|
]
|
21
InvenTree/supplier/migrations/0004_auto_20180414_0624.py
Normal file
21
InvenTree/supplier/migrations/0004_auto_20180414_0624.py
Normal file
@ -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'),
|
||||||
|
),
|
||||||
|
]
|
0
InvenTree/supplier/migrations/__init__.py
Normal file
0
InvenTree/supplier/migrations/__init__.py
Normal file
47
InvenTree/track/migrations/0001_initial.py
Normal file
47
InvenTree/track/migrations/0001_initial.py
Normal file
@ -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')]),
|
||||||
|
),
|
||||||
|
]
|
26
InvenTree/track/migrations/0002_auto_20180413_1440.py
Normal file
26
InvenTree/track/migrations/0002_auto_20180413_1440.py
Normal file
@ -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(),
|
||||||
|
),
|
||||||
|
]
|
0
InvenTree/track/migrations/__init__.py
Normal file
0
InvenTree/track/migrations/__init__.py
Normal file
Loading…
Reference in New Issue
Block a user