mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 13:05:42 +00:00
Restart migrations
- Easier to delete all the migrations and start again :'(
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.12 on 2018-04-22 11:53
|
||||
from __future__ import unicode_literals
|
||||
# Generated by Django 2.2 on 2019-05-18 14:04
|
||||
|
||||
import company.models
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
@ -18,15 +18,60 @@ class Migration(migrations.Migration):
|
||||
name='Company',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(help_text='Company naem', max_length=100, unique=True)),
|
||||
('description', models.CharField(max_length=500)),
|
||||
('name', models.CharField(help_text='Company name', max_length=100, unique=True)),
|
||||
('description', models.CharField(help_text='Description of the company', max_length=500)),
|
||||
('website', models.URLField(blank=True, help_text='Company website URL')),
|
||||
('address', models.CharField(blank=True, help_text='Company address', 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)),
|
||||
('phone', models.CharField(blank=True, help_text='Contact phone number', max_length=50)),
|
||||
('email', models.EmailField(blank=True, help_text='Contact email address', max_length=254)),
|
||||
('contact', models.CharField(blank=True, help_text='Point of contact', max_length=100)),
|
||||
('URL', models.URLField(blank=True, help_text='Link to external company information')),
|
||||
('image', models.ImageField(blank=True, max_length=255, null=True, upload_to=company.models.rename_company_image)),
|
||||
('notes', models.TextField(blank=True)),
|
||||
('is_customer', models.BooleanField(default=False, help_text='Do you sell items to this company?')),
|
||||
('is_supplier', models.BooleanField(default=True, help_text='Do you purchase items from this company?')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Contact',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=100)),
|
||||
('phone', models.CharField(blank=True, max_length=100)),
|
||||
('email', models.EmailField(blank=True, max_length=254)),
|
||||
('role', models.CharField(blank=True, max_length=100)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='SupplierPart',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('SKU', models.CharField(help_text='Supplier stock keeping unit', max_length=100)),
|
||||
('manufacturer', models.CharField(blank=True, help_text='Manufacturer', max_length=100)),
|
||||
('MPN', models.CharField(blank=True, help_text='Manufacturer part number', max_length=100)),
|
||||
('URL', models.URLField(blank=True, help_text='URL for external supplier part link')),
|
||||
('description', models.CharField(blank=True, help_text='Supplier part description', max_length=250)),
|
||||
('note', models.CharField(blank=True, help_text='Notes', max_length=100)),
|
||||
('base_cost', models.DecimalField(decimal_places=3, default=0, help_text='Minimum charge (e.g. stocking fee)', max_digits=10, validators=[django.core.validators.MinValueValidator(0)])),
|
||||
('packaging', models.CharField(blank=True, help_text='Part packaging', max_length=50)),
|
||||
('multiple', models.PositiveIntegerField(default=1, help_text='Order multiple', validators=[django.core.validators.MinValueValidator(1)])),
|
||||
('minimum', models.PositiveIntegerField(default=1, help_text='Minimum order quantity (MOQ)', validators=[django.core.validators.MinValueValidator(1)])),
|
||||
('lead_time', models.DurationField(blank=True, null=True)),
|
||||
],
|
||||
options={
|
||||
'db_table': 'part_supplierpart',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='SupplierPriceBreak',
|
||||
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(1)])),
|
||||
('cost', models.DecimalField(decimal_places=5, max_digits=10, validators=[django.core.validators.MinValueValidator(0)])),
|
||||
('part', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pricebreaks', to='company.SupplierPart')),
|
||||
],
|
||||
options={
|
||||
'db_table': 'part_supplierpricebreak',
|
||||
},
|
||||
),
|
||||
]
|
||||
|
@ -1,25 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.12 on 2018-04-22 12:01
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('company', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='company',
|
||||
name='is_customer',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='company',
|
||||
name='is_supplier',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
]
|
40
InvenTree/company/migrations/0002_auto_20190519_0004.py
Normal file
40
InvenTree/company/migrations/0002_auto_20190519_0004.py
Normal file
@ -0,0 +1,40 @@
|
||||
# Generated by Django 2.2 on 2019-05-18 14:04
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('company', '0001_initial'),
|
||||
('part', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='supplierpart',
|
||||
name='part',
|
||||
field=models.ForeignKey(help_text='Select part', limit_choices_to={'purchaseable': True}, on_delete=django.db.models.deletion.CASCADE, related_name='supplier_parts', to='part.Part'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='supplierpart',
|
||||
name='supplier',
|
||||
field=models.ForeignKey(help_text='Select supplier', limit_choices_to={'is_supplier': True}, on_delete=django.db.models.deletion.CASCADE, related_name='parts', to='company.Company'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='contact',
|
||||
name='company',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='contacts', to='company.Company'),
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='supplierpricebreak',
|
||||
unique_together={('part', 'quantity')},
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='supplierpart',
|
||||
unique_together={('part', 'supplier', 'SKU')},
|
||||
),
|
||||
]
|
@ -1,25 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.12 on 2018-04-23 11:17
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('company', '0002_auto_20180422_1201'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='company',
|
||||
name='is_supplier',
|
||||
field=models.BooleanField(default=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='company',
|
||||
name='name',
|
||||
field=models.CharField(help_text='Company name', max_length=100, unique=True),
|
||||
),
|
||||
]
|
@ -1,20 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.12 on 2018-04-24 08:01
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('company', '0003_auto_20180423_1117'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='company',
|
||||
name='URL',
|
||||
field=models.URLField(blank=True, help_text='Link to external company information'),
|
||||
),
|
||||
]
|
@ -1,27 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.12 on 2018-04-30 07:19
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('company', '0004_company_url'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Contact',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=100)),
|
||||
('phone', models.CharField(blank=True, max_length=100)),
|
||||
('email', models.EmailField(blank=True, max_length=254)),
|
||||
('role', models.CharField(blank=True, max_length=100)),
|
||||
('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='contacts', to='company.Company')),
|
||||
],
|
||||
),
|
||||
]
|
@ -1,43 +0,0 @@
|
||||
# Generated by Django 2.2 on 2019-05-08 13:32
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('company', '0005_contact'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='company',
|
||||
name='contact',
|
||||
field=models.CharField(blank=True, help_text='Point of contact', max_length=100),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='company',
|
||||
name='description',
|
||||
field=models.CharField(help_text='Description of the company', max_length=500),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='company',
|
||||
name='email',
|
||||
field=models.EmailField(blank=True, help_text='Contact email address', max_length=254),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='company',
|
||||
name='is_customer',
|
||||
field=models.BooleanField(default=False, help_text='Do you sell items to this company?'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='company',
|
||||
name='is_supplier',
|
||||
field=models.BooleanField(default=True, help_text='Do you purchase items from this company?'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='company',
|
||||
name='phone',
|
||||
field=models.CharField(blank=True, help_text='Contact phone number', max_length=50),
|
||||
),
|
||||
]
|
@ -1,52 +0,0 @@
|
||||
# Generated by Django 2.2 on 2019-05-18 07:59
|
||||
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('part', '0032_auto_20190518_1759'),
|
||||
('company', '0006_auto_20190508_2332'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='SupplierPart',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('SKU', models.CharField(help_text='Supplier stock keeping unit', max_length=100)),
|
||||
('manufacturer', models.CharField(blank=True, help_text='Manufacturer', max_length=100)),
|
||||
('MPN', models.CharField(blank=True, help_text='Manufacturer part number', max_length=100)),
|
||||
('URL', models.URLField(blank=True, help_text='URL for external supplier part link')),
|
||||
('description', models.CharField(blank=True, help_text='Supplier part description', max_length=250)),
|
||||
('note', models.CharField(blank=True, help_text='Notes', max_length=100)),
|
||||
('base_cost', models.DecimalField(decimal_places=3, default=0, help_text='Minimum charge (e.g. stocking fee)', max_digits=10, validators=[django.core.validators.MinValueValidator(0)])),
|
||||
('packaging', models.CharField(blank=True, help_text='Part packaging', max_length=50)),
|
||||
('multiple', models.PositiveIntegerField(default=1, help_text='Order multiple', validators=[django.core.validators.MinValueValidator(1)])),
|
||||
('minimum', models.PositiveIntegerField(default=1, help_text='Minimum order quantity (MOQ)', validators=[django.core.validators.MinValueValidator(1)])),
|
||||
('lead_time', models.DurationField(blank=True, null=True)),
|
||||
('part', models.ForeignKey(help_text='Select part', limit_choices_to={'purchaseable': True}, on_delete=django.db.models.deletion.CASCADE, related_name='supplier_parts', to='part.Part')),
|
||||
('supplier', models.ForeignKey(help_text='Select supplier', limit_choices_to={'is_supplier': True}, on_delete=django.db.models.deletion.CASCADE, related_name='parts', to='company.Company')),
|
||||
],
|
||||
options={
|
||||
'db_table': 'part_supplierpart',
|
||||
'unique_together': {('part', 'supplier', 'SKU')},
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='SupplierPriceBreak',
|
||||
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(1)])),
|
||||
('cost', models.DecimalField(decimal_places=3, max_digits=10, validators=[django.core.validators.MinValueValidator(0)])),
|
||||
('part', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pricebreaks', to='company.SupplierPart')),
|
||||
],
|
||||
options={
|
||||
'db_table': 'part_supplierpricebreak',
|
||||
'unique_together': {('part', 'quantity')},
|
||||
},
|
||||
),
|
||||
]
|
@ -1,19 +0,0 @@
|
||||
# Generated by Django 2.2 on 2019-05-18 11:20
|
||||
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('company', '0007_supplierpart_supplierpricebreak'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='supplierpricebreak',
|
||||
name='cost',
|
||||
field=models.DecimalField(decimal_places=5, max_digits=10, validators=[django.core.validators.MinValueValidator(0)]),
|
||||
),
|
||||
]
|
Reference in New Issue
Block a user