# Generated by Django 3.2.7 on 2021-09-05 17:16

from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("torque", "0028_auto_20210905_1659"),
    ]

    operations = [
        migrations.RenameModel(
            old_name="Spreadsheet",
            new_name="Collection",
        ),
        migrations.RemoveConstraint(
            model_name="attachment",
            name="unique_attachment",
        ),
        migrations.RemoveConstraint(
            model_name="tableofcontents",
            name="unique_toc",
        ),
        migrations.RemoveConstraint(
            model_name="template",
            name="unique_template",
        ),
        migrations.RenameField(
            model_name="attachment",
            old_name="sheet",
            new_name="collection",
        ),
        migrations.RenameField(
            model_name="document",
            old_name="sheet",
            new_name="collection",
        ),
        migrations.RenameField(
            model_name="field",
            old_name="sheet",
            new_name="collection",
        ),
        migrations.RenameField(
            model_name="searchcachedocument",
            old_name="sheet",
            new_name="collection",
        ),
        migrations.RenameField(
            model_name="tableofcontents",
            old_name="sheet",
            new_name="collection",
        ),
        migrations.RenameField(
            model_name="template",
            old_name="sheet",
            new_name="collection",
        ),
        migrations.RenameField(
            model_name="valueedit",
            old_name="sheet",
            new_name="collection",
        ),
        migrations.RenameField(
            model_name="wikiconfig",
            old_name="sheet",
            new_name="collection",
        ),
        migrations.AddConstraint(
            model_name="attachment",
            constraint=models.UniqueConstraint(
                fields=("collection", "document", "name"), name="unique_attachment"
            ),
        ),
        migrations.AddConstraint(
            model_name="tableofcontents",
            constraint=models.UniqueConstraint(
                fields=("collection", "name"), name="unique_toc"
            ),
        ),
        migrations.AddConstraint(
            model_name="template",
            constraint=models.UniqueConstraint(
                fields=("collection", "type", "name"), name="unique_template"
            ),
        ),
    ]
