2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 04:25:42 +00:00

Added migration files to git index

This commit is contained in:
Oliver
2018-04-14 18:36:06 +10:00
parent a31ec388f4
commit 226828791f
27 changed files with 853 additions and 1 deletions

View 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')]),
),
]

View 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)]),
),
]

View 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),
),
]

View File