Reset all migrations

This commit is contained in:
Skia
2016-08-10 13:52:57 +02:00
parent 792d66da33
commit 1775569ecf
66 changed files with 346 additions and 1545 deletions

View File

@ -9,8 +9,9 @@ from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('club', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('core', '0001_initial'),
('club', '0001_initial'),
]
operations = [
@ -18,59 +19,113 @@ class Migration(migrations.Migration):
name='Counter',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('name', models.CharField(max_length=30, verbose_name='name')),
('type', models.CharField(choices=[('BAR', 'Bar'), ('OFFICE', 'Office')], max_length=255, verbose_name='subscription type')),
('club', models.ForeignKey(to='club.Club', related_name='counters')),
('edit_groups', models.ManyToManyField(related_name='editable_counters', to='core.Group', blank=True)),
('name', models.CharField(verbose_name='name', max_length=30)),
('type', models.CharField(verbose_name='subscription type', max_length=255, choices=[('BAR', 'Bar'), ('OFFICE', 'Office'), ('EBOUTIC', 'Eboutic')])),
('club', models.ForeignKey(related_name='counters', to='club.Club')),
('edit_groups', models.ManyToManyField(to='core.Group', related_name='editable_counters', blank=True)),
],
options={
'verbose_name': 'counter',
},
),
migrations.CreateModel(
name='Customer',
fields=[
('user', models.OneToOneField(to=settings.AUTH_USER_MODEL, primary_key=True, serialize=False)),
('account_id', models.CharField(unique=True, max_length=10, verbose_name='account id')),
('user', models.OneToOneField(primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
('account_id', models.CharField(verbose_name='account id', unique=True, max_length=10)),
('amount', accounting.models.CurrencyField(verbose_name='amount', decimal_places=2, max_digits=12)),
],
options={
'verbose_name_plural': 'customers',
'verbose_name': 'customer',
'verbose_name_plural': 'customers',
'ordering': ['account_id'],
},
),
migrations.CreateModel(
name='Permanency',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('start', models.DateTimeField(verbose_name='start date')),
('end', models.DateTimeField(verbose_name='end date')),
('counter', models.ForeignKey(related_name='permanencies', to='counter.Counter')),
('user', models.ForeignKey(related_name='permanencies', to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'permanency',
},
),
migrations.CreateModel(
name='Product',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('name', models.CharField(max_length=30, verbose_name='name')),
('description', models.TextField(blank=True, verbose_name='description')),
('code', models.CharField(max_length=10, verbose_name='code')),
('purchase_price', accounting.models.CurrencyField(max_digits=12, decimal_places=2, verbose_name='purchase price')),
('selling_price', accounting.models.CurrencyField(max_digits=12, decimal_places=2, verbose_name='selling price')),
('special_selling_price', accounting.models.CurrencyField(max_digits=12, decimal_places=2, verbose_name='special selling price')),
('icon', models.ImageField(blank=True, upload_to='products', null=True)),
('club', models.ForeignKey(to='club.Club', related_name='products')),
('name', models.CharField(verbose_name='name', max_length=30)),
('description', models.TextField(verbose_name='description', blank=True)),
('code', models.CharField(verbose_name='code', max_length=10)),
('purchase_price', accounting.models.CurrencyField(verbose_name='purchase price', decimal_places=2, max_digits=12)),
('selling_price', accounting.models.CurrencyField(verbose_name='selling price', decimal_places=2, max_digits=12)),
('special_selling_price', accounting.models.CurrencyField(verbose_name='special selling price', decimal_places=2, max_digits=12)),
('icon', models.ImageField(upload_to='products', null=True, blank=True)),
('club', models.ForeignKey(related_name='products', to='club.Club')),
],
options={
'verbose_name': 'product',
},
),
migrations.CreateModel(
name='ProductType',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('name', models.CharField(max_length=30, verbose_name='name')),
('description', models.TextField(blank=True, verbose_name='description', null=True)),
('icon', models.ImageField(blank=True, upload_to='products', null=True)),
('name', models.CharField(verbose_name='name', max_length=30)),
('description', models.TextField(verbose_name='description', null=True, blank=True)),
('icon', models.ImageField(upload_to='products', null=True, blank=True)),
],
options={
'verbose_name': 'product type',
},
),
migrations.CreateModel(
name='Refilling',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('amount', accounting.models.CurrencyField(verbose_name='amount', decimal_places=2, max_digits=12)),
('date', models.DateTimeField(verbose_name='date', auto_now=True)),
('payment_method', models.CharField(default='cash', verbose_name='payment method', max_length=255, choices=[('CHEQUE', 'Check'), ('CASH', 'Cash')])),
('bank', models.CharField(default='other', verbose_name='bank', max_length=255, choices=[('OTHER', 'Autre'), ('LA-POSTE', 'La Poste'), ('CREDIT-AGRICOLE', 'Credit Agricole'), ('CREDIT-MUTUEL', 'Credit Mutuel')])),
('is_validated', models.BooleanField(default=False, verbose_name='is validated')),
('counter', models.ForeignKey(related_name='refillings', to='counter.Counter')),
('customer', models.ForeignKey(related_name='refillings', to='counter.Customer')),
('operator', models.ForeignKey(related_name='refillings_as_operator', to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'refilling',
},
),
migrations.CreateModel(
name='Selling',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('label', models.CharField(verbose_name='label', max_length=30)),
('unit_price', accounting.models.CurrencyField(verbose_name='unit price', decimal_places=2, max_digits=12)),
('quantity', models.IntegerField(verbose_name='quantity')),
('date', models.DateTimeField(verbose_name='date', auto_now=True)),
('is_validated', models.BooleanField(default=False, verbose_name='is validated')),
('counter', models.ForeignKey(related_name='sellings', to='counter.Counter')),
('customer', models.ForeignKey(related_name='buyings', to='counter.Customer')),
('product', models.ForeignKey(blank=True, null=True, to='counter.Product', related_name='sellings')),
('seller', models.ForeignKey(related_name='sellings_as_operator', to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'selling',
},
),
migrations.AddField(
model_name='product',
name='product_type',
field=models.ForeignKey(to='counter.ProductType', related_name='products', null=True, blank=True),
field=models.ForeignKey(blank=True, null=True, to='counter.ProductType', related_name='products'),
),
migrations.AddField(
model_name='counter',
name='products',
field=models.ManyToManyField(related_name='counters', to='counter.Product', blank=True),
),
migrations.AddField(
model_name='counter',
name='view_groups',
field=models.ManyToManyField(related_name='viewable_counters', to='core.Group', blank=True),
field=models.ManyToManyField(to='counter.Product', related_name='counters', blank=True),
),
]

View File

@ -7,8 +7,9 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('subscription', '0002_auto_20160718_1805'),
('counter', '0010_auto_20160728_1820'),
('counter', '0001_initial'),
('core', '0001_initial'),
('subscription', '0001_initial'),
]
operations = [
@ -17,4 +18,9 @@ class Migration(migrations.Migration):
name='sellers',
field=models.ManyToManyField(verbose_name='sellers', to='subscription.Subscriber', related_name='counters', blank=True),
),
migrations.AddField(
model_name='counter',
name='view_groups',
field=models.ManyToManyField(to='core.Group', related_name='viewable_counters', blank=True),
),
]

View File

@ -1,42 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import accounting.models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('counter', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Refilling',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('amount', accounting.models.CurrencyField(verbose_name='amount', decimal_places=2, max_digits=12)),
('date', models.DateTimeField(verbose_name='date', auto_now=True)),
('payment_method', models.CharField(verbose_name='payment method', max_length=255, choices=[('cheque', 'Chèque'), ('cash', 'Espèce')])),
('counter', models.ForeignKey(to='counter.Counter', related_name='refillings')),
('customer', models.ForeignKey(to='counter.Customer', related_name='refill_customers')),
('operator', models.ForeignKey(to=settings.AUTH_USER_MODEL, related_name='refill_operators')),
],
),
migrations.CreateModel(
name='Selling',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('unit_price', accounting.models.CurrencyField(verbose_name='unit price', decimal_places=2, max_digits=12)),
('quantity', models.IntegerField(verbose_name='quantity')),
('date', models.DateTimeField(verbose_name='date', auto_now=True)),
('counter', models.ForeignKey(to='counter.Counter', related_name='sellings')),
('customer', models.ForeignKey(to='counter.Customer', related_name='customers')),
('product', models.ForeignKey(to='counter.Product', related_name='sellings')),
('seller', models.ForeignKey(to=settings.AUTH_USER_MODEL, related_name='sellers')),
],
),
]

View File

@ -1,21 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import accounting.models
class Migration(migrations.Migration):
dependencies = [
('counter', '0002_refilling_selling'),
]
operations = [
migrations.AddField(
model_name='customer',
name='amount',
field=accounting.models.CurrencyField(verbose_name='amount', default=0, decimal_places=2, max_digits=12),
preserve_default=False,
),
]

View File

@ -1,24 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('counter', '0003_customer_amount'),
]
operations = [
migrations.AddField(
model_name='refilling',
name='bank',
field=models.CharField(verbose_name='bank', default='other', max_length=255, choices=[('other', 'Autre'), ('la-poste', 'La Poste'), ('credit-agricole', 'Credit Agricole'), ('credit-mutuel', 'Credit Mutuel')]),
),
migrations.AlterField(
model_name='refilling',
name='payment_method',
field=models.CharField(verbose_name='payment method', default='cash', max_length=255, choices=[('cheque', 'Chèque'), ('cash', 'Espèce')]),
),
]

View File

@ -1,35 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('counter', '0004_auto_20160717_0933'),
]
operations = [
migrations.AlterField(
model_name='refilling',
name='customer',
field=models.ForeignKey(to='counter.Customer', related_name='refillings'),
),
migrations.AlterField(
model_name='refilling',
name='operator',
field=models.ForeignKey(to=settings.AUTH_USER_MODEL, related_name='refillings_as_operator'),
),
migrations.AlterField(
model_name='selling',
name='customer',
field=models.ForeignKey(to='counter.Customer', related_name='sellings'),
),
migrations.AlterField(
model_name='selling',
name='seller',
field=models.ForeignKey(to=settings.AUTH_USER_MODEL, related_name='sellings_as_operator'),
),
]

View File

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('counter', '0005_auto_20160717_1029'),
]
operations = [
migrations.AlterField(
model_name='selling',
name='customer',
field=models.ForeignKey(to='counter.Customer', related_name='buyings'),
),
]

View File

@ -1,26 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('counter', '0006_auto_20160717_1033'),
]
operations = [
migrations.CreateModel(
name='Permanency',
fields=[
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
('start', models.DateTimeField(verbose_name='start date')),
('end', models.DateTimeField(verbose_name='end date')),
('counter', models.ForeignKey(related_name='permanencies', to='counter.Counter')),
('user', models.ForeignKey(related_name='permanencies', to=settings.AUTH_USER_MODEL)),
],
),
]

View File

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('counter', '0007_permanency'),
]
operations = [
migrations.AlterField(
model_name='refilling',
name='payment_method',
field=models.CharField(max_length=255, verbose_name='payment method', default='cash', choices=[('cheque', 'Check'), ('cash', 'Cash')]),
),
]

View File

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('counter', '0008_auto_20160718_1805'),
]
operations = [
migrations.AlterField(
model_name='counter',
name='type',
field=models.CharField(max_length=255, verbose_name='subscription type', choices=[('BAR', 'Bar'), ('OFFICE', 'Office'), ('EBOUTIC', 'Eboutic')]),
),
]

View File

@ -1,38 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('counter', '0009_auto_20160721_1902'),
]
operations = [
migrations.AlterModelOptions(
name='counter',
options={'verbose_name': 'counter'},
),
migrations.AlterModelOptions(
name='permanency',
options={'verbose_name': 'permanency'},
),
migrations.AlterModelOptions(
name='product',
options={'verbose_name': 'product'},
),
migrations.AlterModelOptions(
name='producttype',
options={'verbose_name': 'product type'},
),
migrations.AlterModelOptions(
name='refilling',
options={'verbose_name': 'refilling'},
),
migrations.AlterModelOptions(
name='selling',
options={'verbose_name': 'selling'},
),
]

View File

@ -1,35 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('counter', '0011_counter_sellers'),
]
operations = [
migrations.AddField(
model_name='refilling',
name='is_validated',
field=models.BooleanField(default=False, verbose_name='is validated'),
),
migrations.AddField(
model_name='selling',
name='is_validated',
field=models.BooleanField(default=False, verbose_name='is validated'),
),
migrations.AddField(
model_name='selling',
name='label',
field=models.CharField(max_length=30, default='troll', verbose_name='label'),
preserve_default=False,
),
migrations.AlterField(
model_name='selling',
name='product',
field=models.ForeignKey(related_name='sellings', to='counter.Product', blank=True),
),
]

View File

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('counter', '0012_auto_20160801_2016'),
]
operations = [
migrations.AlterField(
model_name='selling',
name='product',
field=models.ForeignKey(to='counter.Product', null=True, related_name='sellings', blank=True),
),
]

View File

@ -1,18 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('counter', '0013_auto_20160801_2255'),
]
operations = [
migrations.AlterModelOptions(
name='customer',
options={'verbose_name': 'customer', 'ordering': ['account_id'], 'verbose_name_plural': 'customers'},
),
]

View File

@ -1,24 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('counter', '0014_auto_20160804_1603'),
]
operations = [
migrations.AlterField(
model_name='refilling',
name='bank',
field=models.CharField(max_length=255, verbose_name='bank', choices=[('OTHER', 'Autre'), ('LA-POSTE', 'La Poste'), ('CREDIT-AGRICOLE', 'Credit Agricole'), ('CREDIT-MUTUEL', 'Credit Mutuel')], default='other'),
),
migrations.AlterField(
model_name='refilling',
name='payment_method',
field=models.CharField(max_length=255, verbose_name='payment method', choices=[('CHEQUE', 'Check'), ('CASH', 'Cash')], default='cash'),
),
]