mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
Reset all migrations
This commit is contained in:
@ -2,32 +2,33 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
from django.conf import settings
|
||||
import accounting.models
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
('counter', '0009_auto_20160721_1902'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Basket',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
|
||||
('date', models.DateTimeField(auto_now=True, verbose_name='date')),
|
||||
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
|
||||
('date', models.DateTimeField(verbose_name='date', auto_now=True)),
|
||||
('user', models.ForeignKey(verbose_name='user', related_name='baskets', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='BasketItem',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
|
||||
('product_name', models.CharField(max_length=255, verbose_name='product name')),
|
||||
('product_unit_price', accounting.models.CurrencyField(max_digits=12, decimal_places=2, verbose_name='unit price')),
|
||||
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
|
||||
('product_id', models.IntegerField(verbose_name='product id')),
|
||||
('product_name', models.CharField(verbose_name='product name', max_length=255)),
|
||||
('type', models.CharField(verbose_name='product type', max_length=255)),
|
||||
('product_unit_price', accounting.models.CurrencyField(verbose_name='unit price', decimal_places=2, max_digits=12)),
|
||||
('quantity', models.IntegerField(verbose_name='quantity')),
|
||||
('basket', models.ForeignKey(verbose_name='basket', related_name='items', to='eboutic.Basket')),
|
||||
],
|
||||
@ -38,19 +39,21 @@ class Migration(migrations.Migration):
|
||||
migrations.CreateModel(
|
||||
name='Invoice',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
|
||||
('date', models.DateTimeField(auto_now=True, verbose_name='date')),
|
||||
('payment_method', models.CharField(max_length=20, choices=[('CREDIT_CARD', 'Credit card'), ('SITH_ACCOUNT', 'Sith account')], verbose_name='payment method')),
|
||||
('products', models.ManyToManyField(related_name='invoices', to='counter.Product', blank=True, verbose_name='products')),
|
||||
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
|
||||
('date', models.DateTimeField(verbose_name='date', auto_now=True)),
|
||||
('payment_method', models.CharField(verbose_name='payment method', max_length=20, choices=[('CREDIT_CARD', 'Credit card'), ('SITH_ACCOUNT', 'Sith account')])),
|
||||
('validated', models.BooleanField(default=False, verbose_name='validated')),
|
||||
('user', models.ForeignKey(verbose_name='user', related_name='invoices', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='InvoiceItem',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
|
||||
('product_name', models.CharField(max_length=255, verbose_name='product name')),
|
||||
('product_unit_price', accounting.models.CurrencyField(max_digits=12, decimal_places=2, verbose_name='unit price')),
|
||||
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
|
||||
('product_id', models.IntegerField(verbose_name='product id')),
|
||||
('product_name', models.CharField(verbose_name='product name', max_length=255)),
|
||||
('type', models.CharField(verbose_name='product type', max_length=255)),
|
||||
('product_unit_price', accounting.models.CurrencyField(verbose_name='unit price', decimal_places=2, max_digits=12)),
|
||||
('quantity', models.IntegerField(verbose_name='quantity')),
|
||||
('invoice', models.ForeignKey(verbose_name='invoice', related_name='items', to='eboutic.Invoice')),
|
||||
],
|
||||
@ -58,13 +61,4 @@ class Migration(migrations.Migration):
|
||||
'abstract': False,
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Eboutic',
|
||||
fields=[
|
||||
],
|
||||
options={
|
||||
'proxy': True,
|
||||
},
|
||||
bases=('counter.counter',),
|
||||
),
|
||||
]
|
||||
|
@ -1,23 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('eboutic', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='invoice',
|
||||
name='products',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='invoice',
|
||||
name='validated',
|
||||
field=models.BooleanField(default=False, verbose_name='validated'),
|
||||
),
|
||||
]
|
@ -1,29 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('eboutic', '0002_auto_20160722_0100'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.DeleteModel(
|
||||
name='Eboutic',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='basketitem',
|
||||
name='type',
|
||||
field=models.CharField(default='GUY', verbose_name='product type', max_length=255),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='invoiceitem',
|
||||
name='type',
|
||||
field=models.CharField(default='GUY', verbose_name='product type', max_length=255),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
@ -1,26 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('eboutic', '0003_auto_20160726_1708'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='basketitem',
|
||||
name='product_id',
|
||||
field=models.IntegerField(verbose_name='product id', default=0),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='invoiceitem',
|
||||
name='product_id',
|
||||
field=models.IntegerField(verbose_name='product id', default=0),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
Reference in New Issue
Block a user