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

@ -8,59 +8,90 @@ import accounting.models
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
('club', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='AccountingType',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('code', models.CharField(max_length=16, verbose_name='code')),
('label', models.CharField(max_length=60, verbose_name='label')),
('movement_type', models.CharField(choices=[('credit', 'Credit'), ('debit', 'Debit'), ('neutral', 'Neutral')], max_length=12, verbose_name='movement type')),
('id', models.AutoField(serialize=False, auto_created=True, verbose_name='ID', primary_key=True)),
('code', models.CharField(verbose_name='code', max_length=16)),
('label', models.CharField(verbose_name='label', max_length=60)),
('movement_type', models.CharField(verbose_name='movement type', choices=[('credit', 'Credit'), ('debit', 'Debit'), ('neutral', 'Neutral')], max_length=12)),
],
options={
'verbose_name': 'accounting type',
},
),
migrations.CreateModel(
name='BankAccount',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('name', models.CharField(max_length=30, verbose_name='name')),
('rib', models.CharField(blank=True, max_length=255, verbose_name='rib')),
('number', models.CharField(blank=True, max_length=255, verbose_name='account number')),
('id', models.AutoField(serialize=False, auto_created=True, verbose_name='ID', primary_key=True)),
('name', models.CharField(verbose_name='name', max_length=30)),
('iban', models.CharField(blank=True, verbose_name='iban', max_length=255)),
('number', models.CharField(blank=True, verbose_name='account number', max_length=255)),
('club', models.ForeignKey(related_name='bank_accounts', to='club.Club')),
],
),
migrations.CreateModel(
name='ClubAccount',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('name', models.CharField(max_length=30, verbose_name='name')),
('bank_account', models.ForeignKey(to='accounting.BankAccount', related_name='club_accounts')),
('id', models.AutoField(serialize=False, auto_created=True, verbose_name='ID', primary_key=True)),
('name', models.CharField(verbose_name='name', max_length=30)),
('bank_account', models.ForeignKey(related_name='club_accounts', to='accounting.BankAccount')),
('club', models.OneToOneField(related_name='club_account', to='club.Club')),
],
),
migrations.CreateModel(
name='Company',
fields=[
('id', models.AutoField(serialize=False, auto_created=True, verbose_name='ID', primary_key=True)),
('name', models.CharField(verbose_name='name', max_length=60)),
],
options={
'verbose_name': 'company',
},
),
migrations.CreateModel(
name='GeneralJournal',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('id', models.AutoField(serialize=False, auto_created=True, verbose_name='ID', primary_key=True)),
('start_date', models.DateField(verbose_name='start date')),
('end_date', models.DateField(default=None, blank=True, verbose_name='end date', null=True)),
('name', models.CharField(max_length=30, verbose_name='name')),
('closed', models.BooleanField(verbose_name='is closed', default=False)),
('club_account', models.ForeignKey(to='accounting.ClubAccount', related_name='journals')),
('end_date', models.DateField(default=None, null=True, verbose_name='end date', blank=True)),
('name', models.CharField(verbose_name='name', max_length=30)),
('closed', models.BooleanField(default=False, verbose_name='is closed')),
('amount', accounting.models.CurrencyField(default=0, decimal_places=2, max_digits=12, verbose_name='amount')),
('effective_amount', accounting.models.CurrencyField(default=0, decimal_places=2, max_digits=12, verbose_name='effective_amount')),
('club_account', models.ForeignKey(related_name='journals', to='accounting.ClubAccount')),
],
),
migrations.CreateModel(
name='Operation',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('amount', accounting.models.CurrencyField(max_digits=12, decimal_places=2, verbose_name='amount')),
('id', models.AutoField(serialize=False, auto_created=True, verbose_name='ID', primary_key=True)),
('number', models.IntegerField(verbose_name='number')),
('amount', accounting.models.CurrencyField(decimal_places=2, max_digits=12, verbose_name='amount')),
('date', models.DateField(verbose_name='date')),
('remark', models.TextField(max_length=255, verbose_name='remark')),
('mode', models.CharField(choices=[('cheque', 'Chèque'), ('cash', 'Espèce'), ('transfert', 'Virement'), ('card', 'Carte banquaire')], max_length=255, verbose_name='payment method')),
('cheque_number', models.IntegerField(verbose_name='cheque number')),
('invoice', models.FileField(blank=True, upload_to='invoices', null=True)),
('done', models.BooleanField(verbose_name='is done', default=False)),
('journal', models.ForeignKey(to='accounting.GeneralJournal', related_name='operations')),
('type', models.ForeignKey(to='accounting.AccountingType', related_name='operations')),
('label', models.CharField(verbose_name='label', max_length=50)),
('remark', models.TextField(verbose_name='remark', max_length=255)),
('mode', models.CharField(verbose_name='payment method', choices=[('CHEQUE', 'Check'), ('CASH', 'Cash'), ('TRANSFert', 'Transfert'), ('CARD', 'Credit card')], max_length=255)),
('cheque_number', models.IntegerField(default=-1, verbose_name='cheque number')),
('done', models.BooleanField(default=False, verbose_name='is done')),
('target_type', models.CharField(verbose_name='target type', choices=[('USER', 'User'), ('CLUB', 'Club'), ('ACCOUNT', 'Account'), ('COMPANY', 'Company'), ('OTHER', 'Other')], max_length=10)),
('target_id', models.IntegerField(null=True, verbose_name='target id', blank=True)),
('target_label', models.CharField(default='', blank=True, verbose_name='target label', max_length=32)),
('accounting_type', models.ForeignKey(verbose_name='accounting type', related_name='operations', to='accounting.AccountingType')),
('invoice', models.ForeignKey(verbose_name='invoice', related_name='operations', blank=True, null=True, to='core.SithFile')),
('journal', models.ForeignKey(related_name='operations', to='accounting.GeneralJournal')),
],
options={
'ordering': ['-number'],
},
),
migrations.AlterUniqueTogether(
name='operation',
unique_together=set([('number', 'journal')]),
),
]

View File

@ -1,25 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('club', '0001_initial'),
('accounting', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='clubaccount',
name='club',
field=models.OneToOneField(to='club.Club', related_name='club_account'),
),
migrations.AddField(
model_name='bankaccount',
name='club',
field=models.ForeignKey(to='club.Club', related_name='bank_accounts'),
),
]

View File

@ -1,30 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import accounting.models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0002_auto_20160530_1001'),
]
operations = [
migrations.RemoveField(
model_name='bankaccount',
name='rib',
),
migrations.AddField(
model_name='bankaccount',
name='iban',
field=models.CharField(blank=True, verbose_name='iban', max_length=255),
),
migrations.AddField(
model_name='generaljournal',
name='amount',
field=accounting.models.CurrencyField(default=0, max_digits=12, decimal_places=2, verbose_name='amount'),
preserve_default=False,
),
]

View File

@ -1,20 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import accounting.models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0003_auto_20160617_1520'),
]
operations = [
migrations.AlterField(
model_name='generaljournal',
name='amount',
field=accounting.models.CurrencyField(max_digits=12, verbose_name='amount', default=0, decimal_places=2),
),
]

View File

@ -1,25 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import accounting.models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0004_auto_20160620_1307'),
]
operations = [
migrations.RenameField(
model_name='operation',
old_name='type',
new_name='accounting_type',
),
migrations.AddField(
model_name='generaljournal',
name='effective_amount',
field=accounting.models.CurrencyField(default=0, decimal_places=2, verbose_name='effective_amount', max_digits=12),
),
]

View File

@ -1,20 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0005_auto_20160622_0953'),
]
operations = [
migrations.AddField(
model_name='operation',
name='type',
field=models.CharField(verbose_name='operation type', choices=[('DEBIT', 'Debit'), ('CREDIT', 'Credit')], max_length=10, default='DEBIT'),
preserve_default=False,
),
]

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 = [
('accounting', '0006_operation_type'),
]
operations = [
migrations.AlterField(
model_name='operation',
name='cheque_number',
field=models.IntegerField(verbose_name='cheque number', default=-1),
),
]

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 = [
('accounting', '0007_auto_20160622_0959'),
]
operations = [
migrations.AlterField(
model_name='operation',
name='type',
field=models.CharField(verbose_name='operation type', choices=[('debit', 'Debit'), ('credit', 'Credit')], max_length=10),
),
]

View File

@ -1,25 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0008_auto_20160622_1005'),
]
operations = [
migrations.AddField(
model_name='operation',
name='label',
field=models.CharField(verbose_name='label', default='', max_length=50),
preserve_default=False,
),
migrations.AlterField(
model_name='operation',
name='type',
field=models.CharField(verbose_name='operation type', choices=[('debit', 'Debit'), ('credit', 'Credit')], max_length=8),
),
]

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 = [
('accounting', '0009_auto_20160622_1030'),
]
operations = [
migrations.RemoveField(
model_name='operation',
name='type',
),
]

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 = [
('accounting', '0010_remove_operation_type'),
]
operations = [
migrations.AlterField(
model_name='operation',
name='mode',
field=models.CharField(max_length=255, verbose_name='payment method', choices=[('cheque', 'Check'), ('cash', 'Cash'), ('transfert', 'Transfert'), ('card', 'Credit card')]),
),
]

View File

@ -1,28 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0011_auto_20160718_1805'),
]
operations = [
migrations.AlterModelOptions(
name='operation',
options={'ordering': ['-number']},
),
migrations.AddField(
model_name='operation',
name='number',
field=models.IntegerField(default=1, verbose_name='number'),
preserve_default=False,
),
migrations.AlterUniqueTogether(
name='operation',
unique_together=set([('number', 'journal')]),
),
]

View File

@ -1,40 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0012_auto_20160720_1847'),
]
operations = [
migrations.CreateModel(
name='Company',
fields=[
('id', models.AutoField(primary_key=True, serialize=False, auto_created=True, verbose_name='ID')),
('name', models.CharField(max_length=60, verbose_name='name')),
],
options={
'verbose_name': 'company',
},
),
migrations.AddField(
model_name='operation',
name='target_id',
field=models.IntegerField(blank=True, null=True, verbose_name='target id'),
),
migrations.AddField(
model_name='operation',
name='target_label',
field=models.CharField(max_length=32, blank=True, default='', verbose_name='target label'),
),
migrations.AddField(
model_name='operation',
name='target_type',
field=models.CharField(max_length=10, default='OTHER', choices=[('USER', 'User'), ('CLUB', 'Club'), ('ACCOUNT', 'Account'), ('COMPANY', 'Company'), ('OTHER', 'Other')], verbose_name='target type'),
preserve_default=False,
),
]

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 = [
('accounting', '0013_auto_20160807_1923'),
]
operations = [
migrations.AlterField(
model_name='operation',
name='mode',
field=models.CharField(max_length=255, verbose_name='payment method', choices=[('CHEQUE', 'Check'), ('CASH', 'Cash'), ('TRANSFert', 'Transfert'), ('CARD', 'Credit card')]),
),
]

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 = [
('accounting', '0014_auto_20160807_1954'),
]
operations = [
migrations.AlterField(
model_name='operation',
name='accounting_type',
field=models.ForeignKey(related_name='operations', verbose_name='accounting type', to='accounting.AccountingType'),
),
migrations.AlterField(
model_name='operation',
name='invoice',
field=models.FileField(upload_to='invoices', verbose_name='invoice', null=True, 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 = [
('accounting', '0015_auto_20160807_1959'),
]
operations = [
migrations.AlterModelOptions(
name='accountingtype',
options={'verbose_name': 'accounting type'},
),
]

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 = [
('accounting', '0016_auto_20160807_2000'),
]
operations = [
migrations.AlterField(
model_name='operation',
name='invoice',
field=models.ForeignKey(blank=True, related_name='operations', to='core.SithFile', null=True, verbose_name='invoice'),
),
]