mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 14:13:21 +00:00
Reset stock migrations
This commit is contained in:
parent
116aa6b8b5
commit
e26ad85729
@ -15,39 +15,56 @@ class Migration(migrations.Migration):
|
||||
migrations.CreateModel(
|
||||
name='ShoppingList',
|
||||
fields=[
|
||||
('id', models.AutoField(primary_key=True, auto_created=True, serialize=False, verbose_name='ID')),
|
||||
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
|
||||
('date', models.DateTimeField(verbose_name='date')),
|
||||
('name', models.CharField(max_length=64, verbose_name='name')),
|
||||
('todo', models.BooleanField(verbose_name='todo')),
|
||||
('comment', models.TextField(verbose_name='comment', blank=True, null=True)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='ShoppingListItem',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
|
||||
('name', models.CharField(max_length=64, verbose_name='name')),
|
||||
('tobuy_quantity', models.IntegerField(verbose_name='quantity to buy', help_text='quantity to buy during the next shopping session', default=6)),
|
||||
('bought_quantity', models.IntegerField(verbose_name='quantity bought', help_text='quantity bought during the last shopping session', default=0)),
|
||||
('shopping_lists', models.ManyToManyField(verbose_name='shopping lists', related_name='shopping_items_to_buy', to='stock.ShoppingList')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Stock',
|
||||
fields=[
|
||||
('id', models.AutoField(primary_key=True, auto_created=True, serialize=False, verbose_name='ID')),
|
||||
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
|
||||
('name', models.CharField(max_length=64, verbose_name='name')),
|
||||
('counter', models.OneToOneField(to='counter.Counter', verbose_name='counter', related_name='stock')),
|
||||
('counter', models.OneToOneField(verbose_name='counter', related_name='stock', to='counter.Counter')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='StockItem',
|
||||
fields=[
|
||||
('id', models.AutoField(primary_key=True, auto_created=True, serialize=False, verbose_name='ID')),
|
||||
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
|
||||
('name', models.CharField(max_length=64, verbose_name='name')),
|
||||
('unit_quantity', models.IntegerField(default=0, help_text='number of element in one box', verbose_name='unit quantity')),
|
||||
('effective_quantity', models.IntegerField(default=0, help_text='number of box', verbose_name='effective quantity')),
|
||||
('stock_owner', models.ForeignKey(to='stock.Stock', related_name='items')),
|
||||
('type', models.ForeignKey(to='counter.ProductType', on_delete=django.db.models.deletion.SET_NULL, null=True, verbose_name='type', blank=True, related_name='stock_items')),
|
||||
('unit_quantity', models.IntegerField(verbose_name='unit quantity', help_text='number of element in one box', default=0)),
|
||||
('effective_quantity', models.IntegerField(verbose_name='effective quantity', help_text='number of box', default=0)),
|
||||
('minimal_quantity', models.IntegerField(verbose_name='minimal quantity', help_text='if the effective quantity is less than the minimal, item is added to the shopping list', default=1)),
|
||||
('stock_owner', models.ForeignKey(related_name='items', to='stock.Stock')),
|
||||
('type', models.ForeignKey(blank=True, null=True, verbose_name='type', related_name='stock_items', on_delete=django.db.models.deletion.SET_NULL, to='counter.ProductType')),
|
||||
],
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='shoppinglist',
|
||||
name='items_to_buy',
|
||||
field=models.ManyToManyField(to='stock.StockItem', related_name='shopping_lists', verbose_name='items to buy'),
|
||||
model_name='shoppinglistitem',
|
||||
name='stockitem_owner',
|
||||
field=models.ForeignKey(null=True, related_name='shopping_item', to='stock.StockItem'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='shoppinglistitem',
|
||||
name='type',
|
||||
field=models.ForeignKey(blank=True, null=True, verbose_name='type', related_name='shoppinglist_items', on_delete=django.db.models.deletion.SET_NULL, to='counter.ProductType'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='shoppinglist',
|
||||
name='stock_owner',
|
||||
field=models.ForeignKey(to='stock.Stock', null=True, related_name='shopping_lists'),
|
||||
field=models.ForeignKey(null=True, related_name='shopping_lists', to='stock.Stock'),
|
||||
),
|
||||
]
|
||||
|
@ -1,29 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('stock', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='stockitem',
|
||||
name='bought_quantity',
|
||||
field=models.IntegerField(help_text='quantity bought during the last shopping session', default=6, verbose_name='quantity bought'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='stockitem',
|
||||
name='minimal_quantity',
|
||||
field=models.IntegerField(help_text='if the effective quantity is less than the minimal, item is added to the shopping list', default=1, verbose_name='minimal quantity'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='stockitem',
|
||||
name='tobuy_quantity',
|
||||
field=models.IntegerField(help_text='quantity to buy during the next shopping session', default=6, verbose_name='quantity to buy'),
|
||||
),
|
||||
]
|
@ -1,32 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('stock', '0002_auto_20170105_2017'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='stockitem',
|
||||
name='bought_quantity',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='stockitem',
|
||||
name='tobuy_quantity',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='shoppinglist',
|
||||
name='bought_quantity',
|
||||
field=models.IntegerField(help_text='quantity bought during the last shopping session', default=6, verbose_name='quantity bought'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='shoppinglist',
|
||||
name='tobuy_quantity',
|
||||
field=models.IntegerField(help_text='quantity to buy during the next shopping session', default=6, verbose_name='quantity to buy'),
|
||||
),
|
||||
]
|
@ -1,32 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('stock', '0003_auto_20170105_2138'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='shoppinglist',
|
||||
name='bought_quantity',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='shoppinglist',
|
||||
name='tobuy_quantity',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='stockitem',
|
||||
name='bought_quantity',
|
||||
field=models.IntegerField(help_text='quantity bought during the last shopping session', verbose_name='quantity bought', default=6),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='stockitem',
|
||||
name='tobuy_quantity',
|
||||
field=models.IntegerField(help_text='quantity to buy during the next shopping session', verbose_name='quantity to buy', default=6),
|
||||
),
|
||||
]
|
@ -1,46 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('stock', '0004_auto_20170105_2145'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='ShoppingListItems',
|
||||
fields=[
|
||||
('id', models.AutoField(primary_key=True, auto_created=True, verbose_name='ID', serialize=False)),
|
||||
('name', models.CharField(max_length=64, verbose_name='name')),
|
||||
('tobuy_quantity', models.IntegerField(verbose_name='quantity to buy', default=6, help_text='quantity to buy during the next shopping session')),
|
||||
('bought_quantity', models.IntegerField(verbose_name='quantity bought', default=6, help_text='quantity bought during the last shopping session')),
|
||||
],
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='stockitem',
|
||||
name='bought_quantity',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='stockitem',
|
||||
name='tobuy_quantity',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='shoppinglist',
|
||||
name='comment',
|
||||
field=models.TextField(null=True, verbose_name='comment', blank=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='shoppinglistitems',
|
||||
name='shoppinglist_owner',
|
||||
field=models.ForeignKey(related_name='item_quantity', to='stock.ShoppingList'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='shoppinglistitems',
|
||||
name='stockitem_owner',
|
||||
field=models.ForeignKey(related_name='item', null=True, to='stock.StockItem'),
|
||||
),
|
||||
]
|
@ -1,48 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('stock', '0005_auto_20170107_0857'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='ShoppingListItem',
|
||||
fields=[
|
||||
('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=64, verbose_name='name')),
|
||||
('tobuy_quantity', models.IntegerField(default=6, help_text='quantity to buy during the next shopping session', verbose_name='quantity to buy')),
|
||||
('bought_quantity', models.IntegerField(default=0, help_text='quantity bought during the last shopping session', verbose_name='quantity bought')),
|
||||
],
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='shoppinglistitems',
|
||||
name='shoppinglist_owner',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='shoppinglistitems',
|
||||
name='stockitem_owner',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='shoppinglist',
|
||||
name='items_to_buy',
|
||||
),
|
||||
migrations.DeleteModel(
|
||||
name='ShoppingListItems',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='shoppinglistitem',
|
||||
name='shopping_lists',
|
||||
field=models.ManyToManyField(related_name='shopping_items_to_buy', to='stock.ShoppingList', verbose_name='shopping lists'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='shoppinglistitem',
|
||||
name='stockitem_owner',
|
||||
field=models.ForeignKey(related_name='item', null=True, to='stock.StockItem'),
|
||||
),
|
||||
]
|
@ -1,21 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('counter', '0011_auto_20161004_2039'),
|
||||
('stock', '0006_auto_20170107_0910'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='shoppinglistitem',
|
||||
name='type',
|
||||
field=models.ForeignKey(null=True, verbose_name='type', on_delete=django.db.models.deletion.SET_NULL, to='counter.ProductType', blank=True, related_name='shoppinglist_items'),
|
||||
),
|
||||
]
|
@ -1,19 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('stock', '0007_shoppinglistitem_type'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='shoppinglistitem',
|
||||
name='stockitem_owner',
|
||||
field=models.ForeignKey(related_name='shopping_item', to='stock.StockItem', null=True),
|
||||
),
|
||||
]
|
Loading…
Reference in New Issue
Block a user