# Generated by Django 3.1.1 on 2020-11-13 10:28

from django.db import migrations, models
import django.db.models.deletion
import mptt.fields


class Migration(migrations.Migration):

    dependencies = [
        ('App', '0024_hierarchy_amount'),
    ]

    operations = [
        migrations.CreateModel(
            name='ChartofAccounts',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('start', models.IntegerField(unique=True)),
                ('end', models.IntegerField(blank=True, null=True, unique=True)),
                ('name', models.CharField(max_length=50, unique=True)),
                ('amount', models.IntegerField(default=0)),
                ('lft', models.PositiveIntegerField(editable=False)),
                ('rght', models.PositiveIntegerField(editable=False)),
                ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
                ('level', models.PositiveIntegerField(editable=False)),
                ('parent', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='App.chartofaccounts')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.RemoveField(
            model_name='chartofaccount',
            name='total',
        ),
        migrations.DeleteModel(
            name='ChartofAccountTotal',
        ),
        migrations.AlterField(
            model_name='cashbook',
            name='ledger',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.chartofaccounts'),
        ),
        migrations.AlterField(
            model_name='journal',
            name='cr_ledger',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cr_ledger', to='App.chartofaccounts'),
        ),
        migrations.AlterField(
            model_name='journal',
            name='dr_ledger',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dr_ledger', to='App.chartofaccounts'),
        ),
        migrations.DeleteModel(
            name='ChartofAccount',
        ),
    ]
