# Generated by Django 3.1.5 on 2021-01-19 21:44

import django.db.models.functions.text
import mptt.fields
from django.db import migrations, models, transaction
from mptt import managers, register


def rebuild_tree(apps, schema_editor):
    Category = apps.get_model("booking", "Category")

    manager = managers.TreeManager()
    manager.model = Category
    register(Category)
    manager.contribute_to_class(Category, "objects")
    with transaction.atomic():
        manager.rebuild()


class Migration(migrations.Migration):
    dependencies = [
        ("booking", "0032_auto_20200924_2308"),
    ]

    operations = [
        migrations.AlterModelOptions(
            name="material",
            options={
                "get_latest_by": "last_modified",
                "ordering": [django.db.models.functions.text.Lower("name")],
                "verbose_name": "material",
                "verbose_name_plural": "materials",
            },
        ),
        migrations.AddField(
            model_name="category",
            name="level",
            field=models.PositiveIntegerField(default=0, editable=False),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name="category",
            name="lft",
            field=models.PositiveIntegerField(default=0, editable=False),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name="category",
            name="parent",
            field=mptt.fields.TreeForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="children",
                to="booking.category",
            ),
        ),
        migrations.AddField(
            model_name="category",
            name="rght",
            field=models.PositiveIntegerField(default=0, editable=False),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name="category",
            name="tree_id",
            field=models.PositiveIntegerField(db_index=True, default=0, editable=False),
            preserve_default=False,
        ),
        migrations.RunPython(rebuild_tree, migrations.RunPython.noop),
    ]

515e9be25a1f95b0363653aee6c7a320bd393efd
<mask token>


class Migration(migrations.Migration):
    <mask token>
    <mask token>

<mask token>


class Migration(migrations.Migration):
    dependencies = [('booking', '0032_auto_20200924_2308')]
    operations = [migrations.AlterModelOptions(name='material', options={
        'get_latest_by': 'last_modified', 'ordering': [django.db.models.
        functions.text.Lower('name')], 'verbose_name': 'material',
        'verbose_name_plural': 'materials'}), migrations.AddField(
        model_name='category', name='level', field=models.
        PositiveIntegerField(default=0, editable=False), preserve_default=
        False), migrations.AddField(model_name='category', name='lft',
        field=models.PositiveIntegerField(default=0, editable=False),
        preserve_default=False), migrations.AddField(model_name='category',
        name='parent', field=mptt.fields.TreeForeignKey(blank=True, null=
        True, on_delete=django.db.models.deletion.CASCADE, related_name=
        'children', to='booking.category')), migrations.AddField(model_name
        ='category', name='rght', field=models.PositiveIntegerField(default
        =0, editable=False), preserve_default=False), migrations.AddField(
        model_name='category', name='tree_id', field=models.
        PositiveIntegerField(db_index=True, default=0, editable=False),
        preserve_default=False), migrations.RunPython(rebuild_tree,
        migrations.RunPython.noop)]

<mask token>


def rebuild_tree(apps, schema_editor):
    Category = apps.get_model('booking', 'Category')
    manager = managers.TreeManager()
    manager.model = Category
    register(Category)
    manager.contribute_to_class(Category, 'objects')
    with transaction.atomic():
        manager.rebuild()


class Migration(migrations.Migration):
    dependencies = [('booking', '0032_auto_20200924_2308')]
    operations = [migrations.AlterModelOptions(name='material', options={
        'get_latest_by': 'last_modified', 'ordering': [django.db.models.
        functions.text.Lower('name')], 'verbose_name': 'material',
        'verbose_name_plural': 'materials'}), migrations.AddField(
        model_name='category', name='level', field=models.
        PositiveIntegerField(default=0, editable=False), preserve_default=
        False), migrations.AddField(model_name='category', name='lft',
        field=models.PositiveIntegerField(default=0, editable=False),
        preserve_default=False), migrations.AddField(model_name='category',
        name='parent', field=mptt.fields.TreeForeignKey(blank=True, null=
        True, on_delete=django.db.models.deletion.CASCADE, related_name=
        'children', to='booking.category')), migrations.AddField(model_name
        ='category', name='rght', field=models.PositiveIntegerField(default
        =0, editable=False), preserve_default=False), migrations.AddField(
        model_name='category', name='tree_id', field=models.
        PositiveIntegerField(db_index=True, default=0, editable=False),
        preserve_default=False), migrations.RunPython(rebuild_tree,
        migrations.RunPython.noop)]

import django.db.models.functions.text
import mptt.fields
from django.db import migrations, models, transaction
from mptt import managers, register


def rebuild_tree(apps, schema_editor):
    Category = apps.get_model('booking', 'Category')
    manager = managers.TreeManager()
    manager.model = Category
    register(Category)
    manager.contribute_to_class(Category, 'objects')
    with transaction.atomic():
        manager.rebuild()


class Migration(migrations.Migration):
    dependencies = [('booking', '0032_auto_20200924_2308')]
    operations = [migrations.AlterModelOptions(name='material', options={
        'get_latest_by': 'last_modified', 'ordering': [django.db.models.
        functions.text.Lower('name')], 'verbose_name': 'material',
        'verbose_name_plural': 'materials'}), migrations.AddField(
        model_name='category', name='level', field=models.
        PositiveIntegerField(default=0, editable=False), preserve_default=
        False), migrations.AddField(model_name='category', name='lft',
        field=models.PositiveIntegerField(default=0, editable=False),
        preserve_default=False), migrations.AddField(model_name='category',
        name='parent', field=mptt.fields.TreeForeignKey(blank=True, null=
        True, on_delete=django.db.models.deletion.CASCADE, related_name=
        'children', to='booking.category')), migrations.AddField(model_name
        ='category', name='rght', field=models.PositiveIntegerField(default
        =0, editable=False), preserve_default=False), migrations.AddField(
        model_name='category', name='tree_id', field=models.
        PositiveIntegerField(db_index=True, default=0, editable=False),
        preserve_default=False), migrations.RunPython(rebuild_tree,
        migrations.RunPython.noop)]

# Generated by Django 3.1.5 on 2021-01-19 21:44

import django.db.models.functions.text
import mptt.fields
from django.db import migrations, models, transaction
from mptt import managers, register


def rebuild_tree(apps, schema_editor):
    Category = apps.get_model("booking", "Category")

    manager = managers.TreeManager()
    manager.model = Category
    register(Category)
    manager.contribute_to_class(Category, "objects")
    with transaction.atomic():
        manager.rebuild()


class Migration(migrations.Migration):
    dependencies = [
        ("booking", "0032_auto_20200924_2308"),
    ]

    operations = [
        migrations.AlterModelOptions(
            name="material",
            options={
                "get_latest_by": "last_modified",
                "ordering": [django.db.models.functions.text.Lower("name")],
                "verbose_name": "material",
                "verbose_name_plural": "materials",
            },
        ),
        migrations.AddField(
            model_name="category",
            name="level",
            field=models.PositiveIntegerField(default=0, editable=False),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name="category",
            name="lft",
            field=models.PositiveIntegerField(default=0, editable=False),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name="category",
            name="parent",
            field=mptt.fields.TreeForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="children",
                to="booking.category",
            ),
        ),
        migrations.AddField(
            model_name="category",
            name="rght",
            field=models.PositiveIntegerField(default=0, editable=False),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name="category",
            name="tree_id",
            field=models.PositiveIntegerField(db_index=True, default=0, editable=False),
            preserve_default=False,
        ),
        migrations.RunPython(rebuild_tree, migrations.RunPython.noop),
    ]
